Non-Boolean Quantum Amplitude Ampification and Quantum Mean Estimation Systems and Methods

ABSTRACT

Generalizations of quantum amplitude amplification and amplitude estimation algorithms work with non-boolean oracles (by way of definition, the action of a non-boolean oracle U φ  on an eigenstate |x  is to apply a state-dependent phase-shift φ(x); unlike boolean oracles, the eigenvalues exp(iφ(x)) of a non-boolean oracle are not restricted to be ±1). The non-boolean amplitude amplification algorithm preferentially amplifies the amplitudes of the eigenstates based on the value of φ(x). Starting from a given initial superposition state |ψ 0   , the basis states with lower values of cos(φ) are amplified at the expense of the basis states with higher values of cos(φ). The non-boolean quantum mean estimation algorithm uses quantum phase estimation to estimate the expectation  ψ 0 |U φ |ψ 0    (i.e., the expected value of exp(iφ(x)) for a random x sampled by making a measurement on |ψ 0   ). The quantum mean estimation algorithm offers a quadratic speedup over its counterpart boolean algorithm known in the art.

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

The invention described in this patent application was made with Government support under the Fermi Research Alliance, LLC, Contract Number DE-ACO2-07CH11359 awarded by the U.S. Department of Energy. The Government has certain rights in the invention.

FIELD OF THE INVENTION

The present invention relates generally to quantum computing technology. More particularly, this invention pertains to devices, systems, and associated methods for achieving computational speed increases in quantum algorithms.

BACKGROUND OF THE INVENTION

Grover's algorithm is a quantum search algorithm for finding the unique input x_(good) that satisfies Equation (1), as follows:

ƒ_(bool)(x _(good))=1,  (1)

for a given boolean function ƒ_(bool): {0, 1, . . . , N−1} →{0,1}. Such an input x_(good) satisfying this boolean function is referred to as the “winning” input of ƒ_(bool). Grover's algorithm has also been adapted to work with boolean functions with multiple winning inputs, where the goal is to find any one of the winning inputs.

An important generalization of Grover's algorithm is the amplitude amplification algorithm in which the function ƒ_(bool) is accessed through a boolean quantum oracle Û_(ƒ) _(bool) that acts on the orthonormal basis states |0

, . . . , |N−1

as follows (Equation (2)):

$\begin{matrix} {\left. {{\hat{U}}_{f_{bool}}{❘x}} \right\rangle = \left\{ \begin{matrix} {\left. {- {❘x}} \right\rangle,} & {{{{if}{f_{bool}(x)}} = 1},} \\ {\left. {+ {❘x}} \right\rangle,} & {{{if}{f_{bool}(x)}} = 0.} \end{matrix} \right.} & (2) \end{matrix}$

In this way, the oracle marks the winning states by flipping their phase (that is, shifting the phase by π). Given a superposition state |ψ₀

, the goal of the amplitude amplification algorithm is to amplify the amplitudes (in the superposition state) of the winning states. The algorithm accomplishes this iteratively by initializing a quantum system in the state |ψ₀

and performing the operation S_(ψ) ₀ Û_(ƒ) _(bool) on the system during each iteration, where

S _(ψ) ₀ ≡2|ψ₀

ψ₀ |−I.  (3)

As shown in Equation (3), I is the identity operator. Performing a measurement on the system after the iterative amplification process results in one of winning states with high probability. Grover's original algorithm is a special case of the amplitude amplification algorithm, where a) the uniform superposition state |s

given by Equation (4):

$\begin{matrix} \left. {\left. {❘s} \right\rangle = {\frac{1}{\sqrt{N}}{\sum\limits_{x = 0}^{N - 1}{❘x}}}} \right\rangle & (4) \end{matrix}$

is used as the initial state |ψ₀

of the system, and b) the number of winning inputs is exactly one.

Closely related to the amplitude amplification algorithm is the amplitude estimation algorithm, which combines features from the amplitude amplification algorithm and a quantum phase estimation (QPE) algorithm to estimate the probability that making a measurement on the initial state |ψ₀

will yield a winning input. If the uniform superposition state |s

is used as |ψ₀

, the amplitude estimation algorithm can help estimate the number of winning inputs of ƒ_(bool) (Note: This special case is also referred to as the quantum counting algorithm).

The amplitude amplification algorithm and the amplitude estimation algorithm have a wide range of applications and are important primitives that feature as subroutines employed by other quantum algorithms. The amplitude amplification algorithm can be used to find a winning input to ƒ_(bool) with

(√{square root over (N)}) queries of the quantum oracle, regardless of whether the number of winning states is a priori known or unknown (Note: The

(√{square root over (N)}) and

(N) scalings for the quantum and classical algorithms, respectively, hold assuming that the number of winning states does not scale with N). This represents a quadratic speedup over classical algorithms, which typically require

(N) evaluations of the function ƒ_(bool). Similarly, the amplitude estimation algorithm also offers a quadratic speedup over the corresponding classical approaches. The quadratic speedup due to the amplitude amplification algorithm has been shown to be optimal for oracular quantum search algorithms.

A limitation of known amplitude amplification and estimation algorithms is that they work only with boolean oracles, which classify the basis states as good and bad. In situations where one is interested in using these algorithms in the context of a non-boolean function of the input x, a typical approach is to create a boolean oracle from the non-boolean function by using a threshold value of the function as a decision boundary. That is, the winning states are the ones for which the value of the function is, say, less than the chosen threshold value. In this way, the problem at hand may be adapted to work with the standard amplitude amplification and estimation algorithms.

Accordingly, a need exists for a solution to at least one of the aforementioned challenges in increasing the computation speed of widely applicable quantum algorithms. For instance, an established need exists for adaptation of certain primitive quantum algorithms to work directly with non-boolean functions.

This background information is provided to reveal information believed by the applicant to be of possible relevance to the present invention. No admission is necessarily intended, nor should be construed, that any of the preceding information constitutes prior art against the present invention.

SUMMARY OF THE INVENTION

With the above in mind, embodiments of the present invention are related to quantum amplitude amplification and amplitude estimation algorithms to work with non-boolean oracles. By way of definition, the action of a non-boolean oracle U_(φ) on an eigenstate |x

is apply a state-dependent, real-valued phase-shift φ(x). Unlike boolean oracles, the eigenvalues exp(iφ(x)) of a non-boolean oracle are not restricted to be ±1.

In one embodiment of the present invention, a non-boolean amplitude amplification algorithm, starting from an initial superposition state |ψ₀

, preferentially amplifies the amplitudes of the basis states based on the value of cos(φ). An objective of the algorithm is to preferentially amplify the states with lower values of cos(φ(x)). The algorithm is iterative in nature such that, after K iterations, the probability for a measurement of the system to yield x (namely p_(K)(x)) differs from the original probability p₀(x) by a factor that is linear in cos(φ(x)). The coefficient −λ_(K) of this linear dependence controls the degree (and direction) of the preferential amplification.

More specifically, embodiments of the present invention (in one or more of method, system, and/or device form) may include the following steps:

(1) Initialize a two-register system in the |Ψ₀

state:

(2) Perform K iterations: During odd iterations, act on an input basis state using a selective phase-flip unitary operator circuit S_(Ψ) ₀ and a controlled unitary operator circuit U_(φ). During even iterations, act on an input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and a controlled inverse unitary operator circuit U_(φ) ^(†); and

(3) After the K iterations, measure the ancilla in the 0/1 basis.

Up to a certain number of iterations, the iterative steps may be designed to amplify the amplitude of the basis states |0,x

and |1,x

with lower values of cos(φ(x)). The measurement of the ancilla at the end of the iterations may be performed simply to ensure that the two registers are not entangled in the final state.

In another embodiment of the present invention, a quantum mean estimation algorithm uses QPE as a subroutine in order to estimate the expectation of U_(φ) under |ψ₀

(i.e.,

ψ₀|ψ_(φ)|ψ₀

). The algorithm offers a quadratic speedup over the classical approach of estimating the expectation, as a sample mean over randomly sampled inputs.

More specifically, embodiments of the present invention (in one or more of method, system, and/or device form) may include the following steps:

(1) Perform the QPE algorithm with a) the two-register unitary operator under consideration, and b) the superposition state |Ψ₀

in place of the eigenstate required by the QPE algorithm as input. Let the output of this step, appropriately scaled to be an estimate of the phase angle in the range [0,2π), be {circumflex over (ω)}.

(2) Return cos({circumflex over (ω)}) as the estimate for cos(θ) (i.e., the real part of E_(ψ) ₀ [e^(iφ)]).

These and other objects, features, and advantages of the present invention will become more readily apparent from the attached drawings and the detailed description of the preferred embodiments, which follow.

BRIEF DESCRIPTION OF THE DRAWINGS

The preferred embodiments of the invention will hereinafter be described in conjunction with the appended drawings provided to illustrate and not to limit the invention, where like designations denote like elements, and in which:

FIG. 1 is a schematic diagram depicting an exemplary quantum circuit implementing a selective phase-flip unitary operator for non-boolean amplitude amplification according to an embodiment of the present invention;

FIG. 2 is a schematic diagram depicting an exemplary quantum circuit implementing a first conditional oracle call unitary operator for a non-boolean amplitude amplification algorithm according to an embodiment of the present invention;

FIG. 3 is a schematic diagram depicting an exemplary quantum circuit implementing a second conditional oracle call unitary operator for a non-boolean amplitude amplification algorithm according to an embodiment of the present invention;

FIG. 4 is schematic diagram depicting a quantum circuit for a first exemplary non-boolean amplification algorithm according to an embodiment of the present invention;

FIG. 5 is pseudocode for a non-boolean amplification algorithm according to FIG. 4 ;

FIG. 6 is a state diagram depicting stage evolution of a two-register system through iterations of the non-boolean amplitude amplification algorithm of FIG. 5 ;

FIG. 7 is schematic diagram depicting a quantum circuit for a second exemplary non-boolean amplification algorithm according to an embodiment of the present invention;

FIG. 8 is a non-boolean amplification algorithm according to FIG. 7 ;

FIG. 9 is a schematic diagram depicting a quantum circuit for a non-boolean mean estimation algorithm according to an embodiment of the present invention;

FIG. 10 depicts a graph of oracle function and initial state of a toy example for quantum simulation;

FIG. 11 depicts a graph of quantum simulation results from application of the non-boolean amplitude amplification algorithm of FIG. 4 to the toy example of FIG. 10 ; and

FIG. 12 depicts graphs of quantum simulation results from application of the non-boolean mean estimation algorithm of FIG. 9 to the toy example of FIG. 10 .

Like reference numerals refer to like parts throughout the several views of the drawings.

DETAILED DESCRIPTION OF THE INVENTION

The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

Although the following detailed description contains many specifics for the purposes of illustration, anyone of ordinary skill in the art will appreciate that many variations and alterations to the following details are within the scope of the invention. Accordingly, the following embodiments of the invention are set forth without any loss of generality to, and without imposing limitations upon, the claimed invention.

As used herein, the word “exemplary” or “illustrative” means “serving as an example, instance, or illustration.” Any implementation described herein as “exemplary” or “illustrative” is not necessarily to be construed as preferred or advantageous over other implementations. All of the implementations described below are exemplary implementations provided to enable persons skilled in the art to make or use the embodiments of the disclosure and are not intended to limit the scope of the disclosure, which is defined by the claims.

Furthermore, in this detailed description, a person skilled in the art should note that quantitative qualifying terms such as “generally,” “substantially,” “mostly,” and other terms are used, in general, to mean that the referred to object, characteristic, or quality constitutes a majority of the subject of the reference. The meaning of any of these terms is dependent upon the context within which it is used, and the meaning may be expressly modified.

Referring initially to FIGS. 1-9 , a non-boolean quantum amplitude amplification algorithm, as also a quantum mean estimation algorithm based in the non-boolean quantum amplitude amplification algorithm, both according to embodiments of the present invention are now described in detail. Throughout this disclosure, the present invention may be referred to as a family of non-boolean quantum amplitude amplification algorithms, a family of non-boolean quantum algorithms, a non-boolean quantum algorithm, a non-boolean quantum method, a non-boolean quantum oracle, a non-boolean quantum system, a method, an oracle, and/or a system. Those skilled in the art will appreciate that this terminology is only illustrative and does not affect the scope of the invention. For instance, the present invention may just as easily relate to an instantiation of an object from a library of non-boolean quantum oracles.

Generally speaking, the present invention is a generalization of amplitude amplification and estimation algorithms to work with quantum oracles for non-boolean functions. Hereinafter, the qualifiers “boolean” and “non-boolean” will be used to distinguish embodiments of the present invention from known boolean versions of the amplitude amplification algorithm and their related applications.

Oracle for a Non-Boolean Function:

The behavior of the boolean quantum oracle Û_(ƒ) _(bool) of Equation (2) may be generalized to non-boolean functions by allowing the oracle to perform arbitrary phase-shifts on the different basis states. More concretely, let φ: {0, 1, . . . , N−1} →

be a real-valued function, and let U_(φ) be a quantum oracle given by Equation (5), as follows:

$\begin{matrix} {{{U_{\varphi} \equiv {\sum\limits_{x = 0}^{N - 1}{e^{i{\varphi(x)}}{\left. {❘x} \right\rangle\left\langle x \right.}}}}❘}.} & (5) \end{matrix}$

The actions of the oracle U_(φ) and its inverse U_(φ) ^(†) on the basis states |0

, . . . , |N−1

may be given by Equations (6) and (7), as follows:

U _(φ) |x)=e ^(+iφ(x)) |x

=[cos(φ(x))+i sin(φ(x))]|x

,  (6)

U _(φ) ^(†) |x)=e ^(−iφ(x)) |x

=[cos(φ(x))−i sin(φ(x))]|x

.  (7)

Goal of the Non-Boolean Amplitude Amplification Algorithm:

Given an oracle U_(φ) and an initial state |ψ₀

, a goal of the non-boolean amplitude amplification algorithm of the present invention may be to preferentially amplify the amplitudes of the basis states |x

with lower values of cos(φ(x)), at the expense of the amplitude of states with higher values of cos(φ(x)). Depending on the context in which the algorithm is to be used, a different function of interest ƒ (which is intended to guide the amplification) may be appropriately mapped onto the function cp. For example, and without limitation, if the range of ƒ is [0,1] and one intends to amplify the states with higher values of ƒ, then options for formulating the problem in terms of co include the following:

φ(x)=πƒ(x) or φ(x)=arccos(1−2ƒ(x)).  (8)

In both cases of Equations (8), cos(φ) is monotonically decreasing in ƒ.

The connection between the boolean and non-boolean amplitude amplification algorithms may be seen as follows: If either of the two options in Equations (8) is used to map a boolean function ƒ_(bool) onto φ_(bool), then

$\begin{matrix} {{\varphi_{bool}(x)} = \left\{ \begin{matrix} {\pi,} & {{{{if}f_{bool}(x)} = 1},} \\ {0,} & {{{if}{f_{bool}(x)}} = 0.} \end{matrix} \right.} & (9) \end{matrix}$

In the case of Equation (9), the oracle U_(φ) and its inverse U_(φ) ^(†) both reduce to a boolean oracle as follows (Equation 10):

U _(φ) _(bool) =U _(φ) _(bool) ^(†) =Û _(ƒ) _(bool) .  (10)

Congruently, the task of amplifying (the amplitude of) the states with lower values of cos(φ) may align with the task of amplifying the winning states |x

with ƒ_(bool)(x)=1.

Goal of the Quantum Mean Estimation Algorithm:

Given a generic unitary operator U and a state |ψ₀

, a goal of the quantum mean estimation algorithm may be to estimate the quantity of Equation (11):

ψ₀ |U|ψ ₀

.  (11)

The task of estimating the quantity of Equation (11) may be phrased in terms of the oracle U_(φ), as estimating the expectation of the eigenvalue e^(iφ(x)) for a state |x

chosen randomly by making a measurement on the superposition state |ψ₀

. The connection between the two tasks may be seen in Equation (12), as follows:

$\begin{matrix} {{\left. {\left\langle {\psi_{0}{❘U_{\varphi}❘}\psi_{0}} \right\rangle = {{\sum\limits_{x = 0}^{N - 1}{\left\langle {\psi_{0}{❘e^{i{\varphi(x)}}❘}x} \right\rangle\left\langle {x{❘\psi_{0}}} \right\rangle}} = {\sum\limits_{x = 0}^{N - 1}{{❘\left\langle x \right.❘}\psi_{0}}}}} \right\rangle ❘^{2}e^{i{\varphi(x)}}},} & (12) \end{matrix}$

wherein |

x|ψ₀

|² is the probability for a measurement on |ψ₀

to yield x.

The only difference between (a) estimating

ψ₀|U_(φ)|ψ₀

for an oracle U_(φ), and (b) estimating

ψ₀|U|ψ₀

for a generic unitary operator U is that {|ψ₀|U_(φ)|ψ₀

, . . . , |N−1)} is known beforehand to be an eigenbasis of U_(φ). On the other hand, the eigenstates of a generic unitary operator U may be a priori unknown. However, as described in detail hereinbelow, the mean estimation algorithm does not use the knowledge of the eigenstates and, therefore, may be applicable for generic unitary operators U as well.

As described hereinabove, the mean estimation algorithm of the present invention is a generalization of known boolean amplitude estimation algorithm(s). Regarding the connection between the respective tasks of these algorithms, note that the eigenvalues of a boolean oracle may be either +1 or −1, and the expectation of the eigenvalue under |ψ₀

is directly related to the probability of a measurement yielding a winning state with eigenvalue −1. This probability is precisely the quantity estimated by the non-boolean amplitude estimation algorithm of the present invention.

Non-Boolean Amplitude Amplification Algorithm:

Setup and Notation: Various embodiments of a non-boolean amplitude amplification algorithm as described herein may include not only a quantum system, or qubit(s), as input to a quantum oracle, but also may employ one extra ancilla qubit. For example, and without limitation, let a quantum system used in certain embodiments of the present algorithm comprise two quantum registers. The first register may contain the lone ancilla qubit, and the second register (input qubit) may be acted upon by the quantum oracle.

The notations |a

⊗|b

and |a,b

may both refer to a state where the two registers are unentangled, with the first register in state |a

and the second register in state |b

. The tensor product notation ⊗ may also be used to combine operators that act on the individual registers into operators that simultaneously act on both registers. Such two-register operators may be represented by boldface symbols (e.g., S_(Ψ) ₀ , U_(φ), I). Likewise, boldface symbols may be used to represent the states of the two-register system in the bra-ket notation (e.g., |Ψ₀

). As used herein, any state written in the bra-ket notation (e.g., |ψ

) will be unit normalized (i.e., normalized to 1). The dagger notation (†) may be used to denote the Hermitian conjugate of an operator, which is also the inverse for a unitary operator.

Unless otherwise specified herein, {|0

, |1

, . . . , |N−1

} may be used as the basis for (that is, as the state space of) the second register. Any measurement of the second register may refer to measurement in this basis. Likewise, unless otherwise specified,

{|0,0

,|0,1

, . . . ,|0,N−1

}∪{|1,0

,|1,1

, . . . ,|1,N−1

}  (13)

may be used as the basis for the two-register system.

In Equation (14) below, let |ψ₀

be the initial state of the second register from which the amplification process is to begin, and let A₀ be the unitary operator that changes the state of the second register from |0

to |ψ₀

(Note: Assumed here, only for notational convenience, is that there exists a state |0

| which is simultaneously an eigenstate of U_(φ), as well as a special, easy-to-prepare state of the second register; a person of skill in the art will immediately recognize the algorithms described herein may be modified to work even without this assumption):

$\begin{matrix} {\left. {\left. {{{\left. \left| \psi_{0} \right. \right\rangle \equiv A_{0}}❘}0} \right\rangle \equiv {\sum\limits_{x = 0}^{N - 1}{{a_{0}(x)}{❘x}}}} \right\rangle,} & (14) \end{matrix}$ suchthat ${{\sum\limits_{x = 0}^{N - 1}\left| {a_{0}(x)} \right|^{2}} = 1},$

where a₀(x) is the initial amplitude of the basis state |x

.

The algorithm introduced hereinbelow may initialize the ancilla (i.e., first register) in the |+

state given by Equation (15), as follows:

$\begin{matrix} {\left. {❘ +} \right\rangle = {\frac{\left. {{{\left. {❘0} \right\rangle +}❘}1} \right\rangle}{\sqrt{2}}.}} & (15) \end{matrix}$

Anticipating this initialization, let the two-register state |Ψ₀

be defined as in Equation (16), as follows:

$\begin{matrix} {\begin{matrix} {\left. {\left. {❘\Psi_{0}} \right\rangle \equiv {❘{+ {,\psi_{0}}}}} \right\rangle = \frac{\left. {{{{\left. {{❘0},\psi_{0}} \right\rangle +}❘}1},\psi_{0}} \right\rangle}{\sqrt{2}}} \\ \left. \left. {\left. {= {\frac{1}{\sqrt{2}}{\sum\limits_{x = 0}^{N - 1}{{a_{0}(x)}\left\lbrack {❘{0,x}} \right.}}}} \right\rangle + {❘{1,x}}} \right\rangle \right\rbrack \end{matrix}.} & (16) \end{matrix}$

Required Unitary Operations: The following unitary operations may be used in certain embodiments of a generalized amplitude amplification algorithm of the present invention:

Selective Phase-Flip Operator. Let the two-register unitary operator S_(Ψ) ₀ be defined as in Equation (17):

$\begin{matrix} {\begin{matrix} {\left. {S_{\Psi_{0}} \equiv {2{❘\Psi_{0}}}} \right\rangle\left\langle {\Psi_{0}{❘{- I}}} \right.} \\ {\left. {= {2{❘{+ {,\psi_{0}}}}}} \right\rangle\left\langle {+ {,{\psi_{0}{❘{- I}}}}} \right.} \end{matrix},} & (17) \end{matrix}$

where I is the two-register identity operator. S_(Ψ) ₀ may leave the state |Ψ₀

unchanged and may flip the phase of any state orthogonal to |Ψ₀

. S_(Ψ) ₀ may be the two-register generalization of S_(ψ) ₀ used in counterpart boolean amplitude amplification algorithm(s). From Equations (14) and (16), it follows (in Equation (18)) that

|Ψ₀

=[H⊗A ₀]|0,0

,  (18)

where H is the Hadamard transform. Thus, S_(Ψ) ₀ may be expressed as in Equation (19):

S _(Ψ) ₀ =[H⊗A ₀][2|0,0

0,0|−I][H⊗A ₀ ^(†)].  (19)

Referring initially to FIG. 1 , an exemplary quantum circuit 100 implementing non-boolean amplitude amplification according to an embodiment of the present invention will now be described in detail. A quantum system of circuit 100 may comprise a first register (ancilla qubit) 110 and a second register (input qubit) 120. The second register 120 may be configured to be acted upon by a quantum oracle 130. As illustrated, Equation (19) is used to drive an implementation of circuit 130 for S_(Ψ) ₀ , provided one has access to the quantum circuits that implement A₀ (unitary operator 142) and A₀ ^(†) (inverse unitary operator 144). Hadamard transforms 150 are denoted as H.

Conditional Oracle Calls: Let the two-register unitary operator U be defined as in Equation (20):

U _(φ)≡|0

|⊗U _(φ)+|1

1|⊗U _(φ) ^(†).  (20)

This operator's action on the basis states of the two-register system is given by Equations (21) and (22):

U _(φ)|0,x)=e ^(+iφ(x))|0,x

,  (21)

U _(φ)|1,x)=e ^(−iφ(x))|1,x

.  (22)

If the ancilla is in state |0

, U_(φ) acts U_(φ) on the second register. On the other hand, if the ancilla is in state |1

, U_(φ) acts U_(φ) ^(†) on the second register. The inverse of U_(φ) is given by Equation (23):

U _(φ) ^(†)=|0

0|⊗U _(φ) ^(†)+|1

1|⊗U _(φ),  (23)

and the action of U_(φ) ^(†) on the basis states is given by Equations (24) and (25):

U _(φ) ^(†)|0,x

=e ^(−iφ(x))|0,x

,  (24)

U _(φ) ^(†)|1,x

=e ^(+iφ(x))|1,x

.  (25)

The amplitude amplification algorithm for non-boolean functions may involve calls to both U_(φ) and U_(φ) ^(†).

Referring now to FIGS. 2 and 3 , exemplary quantum circuits 200 and 300 each implementing non-boolean amplitude amplification according to an embodiment of the present invention will now be described in detail. FIG. 2 depicts a circuit implementation 200 of U_(φ) using a) ancilla 210 serving as a control qubit, b) bit-flip (or Pauli-X) gates 240 denoted as X, and c) second register 220 acted upon by controlled U_(φ) and U_(φ) ^(†) operations (i.e., oracles) 232, 234, respectively. FIG. 3 depicts a circuit implementation 330 of U_(φ) ^(†) using a) ancilla 310 serving as a control qubit, b) bit-flip (or Pauli-X) gates 340 denoted as X, and c) second register 320 acted upon by controlled U_(φ) and U_(φ) ^(†) operations 332, 334, respectively.

Algorithm Description:

Referring now to FIGS. 4 and 5 , an exemplary quantum circuit 400 and pseudocode 500 implementing a non-boolean amplitude amplification quantum algorithm according to an embodiment of the present invention will now be described in detail. For example, and without limitation, the amplitude amplification algorithm for non-boolean functions is iterative and may comprise the following steps:

(1) Initialize a two-register system in the |Ψ₀

state;

(2) Perform K iterations: During odd iterations 402, apply operations 430, 432 denoted S_(Ψ) ₀ U_(φ) on the system. During even iterations 404, apply operations 430, 434 denoted S_(Ψ) ₀ U_(φ) ^(†) on the system; and

(3) After the K iterations, measure 440 the ancilla (first register 410) in the 0/1 basis.

Up to a certain number of iterations, the iterative steps 402, 404 may be designed to amplify the amplitude of the basis states |0,x

and |1,x

with lower values of cos(φ(x)). The measurement 440 of the ancilla 410 at the end of the algorithm may be performed simply to ensure that the two registers 410, 420 are not entangled in the final state 450 of the system. The specification of K (i.e., the number of iterations to perform) is included in an analysis of the present algorithm described hereinbelow.

Connection to Known Boolean Amplitude Amplification Algorithm:

From Equations (20) and (23), a person of skill in the art will immediately recognize that for the boolean oracle case given by φ(x)=πƒ_(bool)(x), U_(φ) and U_(φ) ^(†) both reduce to I⊗Û_(ƒ) _(bool) , where Û_(ƒ) _(bool) is the oracle used in known boolean amplitude amplification algorithm(s). Furthermore, if a first register is in the |+

state, from Equations (3) and (17), the action of S_(Ψ) ₀ is given by Equation (26):

S _(Ψ) ₀ [|+

⊗|ψ

]=|+

⊗[S _(ψ) ₀ |ψ

].  (26)

Note that the first register is unaffected here. Thus, for the boolean oracle case, the algorithm 400, 500 of FIGS. 4 and 5 may reduce to simply acting S_(ψ) ₀ Û_(ƒ) _(bool) on the second register 420 during each iteration 402, 404; the ancilla qubit 410 remains untouched and unentangled from the second register 420. In this way, algorithm 400, 500 is a generalization of known boolean amplitude amplification algorithm(s) described hereinabove.

The two key differences of the generalized algorithm from the boolean algorithm, apart from the usage of a non-boolean oracle, may be as follows:

(1) The addition of the ancilla 410, which doubles the dimension of the state space of the system, and

(2) Alternating between using U_(φ) and U_(φ) ^(†) (operations 432 and 434, respectively) during the odd iterations 402 and even iterations 404.

Analysis of the Non-Boolean Amplitude Amplification Algorithm:

Still referring to FIGS. 4 and 5 , let |Ψ_(k)

be the state of the two-register system after k=0, 1, . . . , K iterations of the amplitude amplification algorithm 400 (but before the measurement 440 of the ancilla 410). For k>0, |Ψ_(k)

may be recursively written as in Equation (27):

$\begin{matrix} {\left. {❘\Psi_{k}} \right\rangle \equiv \left\{ {\begin{matrix} {\left. {S_{\Psi_{0}}U_{\varphi}{❘\Psi_{k - 1}}} \right\rangle,} & {{{if}k{is}{odd}},} \\ {\left. {S_{\Psi_{0}}U_{\varphi}^{\dagger}{❘\Psi_{k - 1}}} \right\rangle,} & {{if}k{is}{even}} \end{matrix}.} \right.} & (27) \end{matrix}$

Let ã_(k) (0,x) and ã_(k)(1,x) be the normalized amplitudes of the basis states |0,x

and |1,x

, respectively, in the superposition |Ψ_(k)

.

$\begin{matrix} {\left. \left. {\left. {\left. {❘\Psi_{k}} \right\rangle \equiv {\sum\limits_{x = 0}^{N}\left\lbrack {{{\overset{\sim}{a}}_{k}\left( {0,x} \right)}{❘{0,x}}} \right.}} \right\rangle + {{{\overset{\sim}{a}}_{k}\left( {1,x} \right)}{❘{1,x}}}} \right\rangle \right\rbrack.} & (28) \end{matrix}$

In the initial state |Ψ₀

, the amplitudes ã₀(0,x) and ã₀(1,x) are both given, from Equation (16), by the following (Equation (29)):

$\begin{matrix} {{{\overset{\sim}{a}}_{0}\left( {0,x} \right)} = {{{\overset{\sim}{a}}_{0}\left( {1,x} \right)} = {\frac{a_{0}(x)}{\sqrt{2}}.}}} & (29) \end{matrix}$

Let the parameter θ∈[0,π] be implicitly defined by Equation (30):

$\begin{matrix} {{\cos(\theta)} \equiv {\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}{{\cos\left( {\varphi(x)} \right)}.}}}} & (30) \end{matrix}$

cos(θ) is the expected value of cos(φ(x)) over bitstrings x sampled by measuring the state |ψ₀

.

Let the two-register states |α

and |β

be defined as follows (Equations (31) and (32)):

|α

≡U _(φ)|Ψ₀

,  (31)

|β

≡U _(φ) ^(†)|Ψ₀

.  (32)

These register states may be used to track the evolution of the system through the iterative steps 402, 404 of algorithm 400, 500. Using Equations (16), (20), and (23), |α

and |0

may be written as follows (Equations (33) and (34)):

$\begin{matrix} {\left. \left. {\left. {\left. {❘\alpha} \right\rangle = {\frac{1}{\sqrt{2}}{\sum\limits_{x = 0}^{N - 1}{{a_{0}(x)}\left\lbrack {e^{i{\varphi(x)}}{❘{0,x}}} \right.}}}} \right\rangle + {e^{{- i}{\varphi(x)}}{❘{1,x}}}} \right\rangle \right\rbrack,} & (33) \end{matrix}$ $\begin{matrix} {\left. \left. {\left. {\left. {❘\beta} \right\rangle = {\frac{1}{\sqrt{2}}{\sum\limits_{x = 0}^{N - 1}{{a_{0}(x)}\left\lbrack {e^{{- i}{\varphi(x)}}{❘{0,x}}} \right.}}}} \right\rangle + {e^{i{\varphi(x)}}{❘{1,x}}}} \right\rangle \right\rbrack.} & (34) \end{matrix}$

Note that θ, |α

, and |β

are all implicitly dependent on the function φ and the initial state |ψ₀

. For notational convenience, these dependencies are not explicitly indicated.

The First Iteration:

After one iterative step, the system may be in state |Ψ₁

given by Equation (35):

|Ψ₁

=S _(Ψ) ₀ U _(φ)|Ψ₀

.  (35)

Using Equations (17) and (31), this state may be written as follows (Equation (36)):

|Ψ₁

=S _(Ψ) ₀ |α

=2

Ψ₀|α

Ψ₀

−|α

.  (36)

From Equations (16), (30), and (33), it follows that

$\begin{matrix} {\begin{matrix} {\left\langle {\Psi_{0}{❘\alpha}} \right\rangle = {\frac{1}{2}{\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}\left\lbrack {{e^{i{\varphi(x)}}\left\langle {0,{x{❘{0,x}}}} \right\rangle} + {e^{{- i}{\varphi(x)}}\left\langle {1,{x{❘{1,x}}}} \right\rangle}} \right\rbrack}}}} \\ {= {\frac{1}{2}{\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}\left\lbrack {e^{i{\varphi(x)}} + e^{{- i}{\varphi(x)}}} \right\rbrack}}}} \\ {= {{\frac{1}{2}{\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}2{\cos\left( {\varphi(x)} \right)}}}} = {\cos(\theta)}}} \end{matrix}.} & (37) \end{matrix}$

Note from Equation (37) that

Ψ₀|α

is real-valued. Key to the functioning of the algorithm 400, 500, the motivation behind adding an ancilla qubit 410 (effectively doubling the number of basis states) is precisely to make

Ψ₀|α

real-valued.

From Equations (36) and (37), |Ψ₁

may be written as follows (Equation (38)):

|Ψ₁

=2 cos(θ)|Ψ₀

−|α

.  (38)

From Equations (16) and (33), the amplitude ã₁(0,x) of the basis state |0,x

in the superposition |Ψ₁

may be written as follows (Equation (39)):

$\begin{matrix} {{{\overset{\sim}{a}}_{1}\left( {0,x} \right)} = {\left\langle {0,{x{❘\Psi_{1}}}} \right\rangle = {{\frac{a_{0}(x)}{\sqrt{2}}\left\lbrack {{2{\cos(\theta)}} - e^{i{\varphi(x)}}} \right\rbrack}.}}} & (39) \end{matrix}$

Likewise, the amplitude ã₁(1,x) of the basis state |1,x

may be written as follows (Equation (40)):

$\begin{matrix} {{{\overset{\sim}{a}}_{1}\left( {1,x} \right)} = {\left\langle {1,{x{❘\Psi_{1}}}} \right\rangle = {{\frac{a_{0}(x)}{\sqrt{2}}\left\lbrack {{2{\cos(\theta)}} - e^{{- i}{\varphi(x)}}} \right\rbrack}.}}} & (40) \end{matrix}$

Equations (39) and (40) show that, after one iterative step, the amplitudes of |0,x

and |1,x

have acquired factors of [2 cos(θ)−e^(iφ(x))] and [2 cos(θ)−e^(−iφ(x))], respectively. Now, Equation (41) shows that, if cos(θ) is positive, the magnitude of the “amplitude amplification factor” after one iteration is monotonically decreasing in cos(φ):

$\begin{matrix} {\frac{{❘{{\overset{\sim}{a}}_{1}\left( {0,x} \right)}❘}^{2}}{{❘{{\overset{\sim}{a}}_{0}\left( {0,x} \right)}❘}^{2}} = {\frac{{❘{{\overset{\sim}{a}}_{1}\left( {1,x} \right)}❘}^{2}}{{❘{{\overset{\sim}{a}}_{0}\left( {1,x} \right)}❘}^{2}} = {{4{\cos^{2}(\theta)}} + 1 - {4{\cos(\theta)}{{\cos\left( {\varphi(x)} \right)}.}}}}} & (41) \end{matrix}$

Such preferential amplification of states with lower values of cos(φ) is precisely what the algorithm 400, 500 set out to do.

Note that this monotonicity property relies on

Ψ₀|α

being real valued in Equation (36). If

Ψ₀|α

is complex, with a phase δ∉{0,π}, then the amplification will be monotonic in cos(φ−δ), which does not meet the present goal of the algorithm 400, 500. The case where

Ψ₀|α

is not real-valued is explored further hereinbelow.

Identities to Track the Subsequent Iterations:

Equations (16), (17), (20), (23), (31), and (32) may be used to derive the identities of Equations (42), which capture the actions of the operators S_(Ψ) ₀ , U_(φ), and U_(φ) ^(†) on the states IWO), |α

, and |β

:

$\begin{matrix} {\left. {\left. {S_{\Psi_{0}}{❘\Psi_{0}}} \right\rangle = {❘\Psi_{0}}} \right\rangle,} & (42) \end{matrix}$ S_(Ψ₀)❘α⟩ = 2cos (θ)❘Ψ₀⟩ − ❘α⟩, S_(Ψ₀)❘β⟩ = 2cos (θ)❘Ψ₀⟩ − ❘β⟩, U_(φ)❘Ψ₀⟩ = ❘α⟩, $\left. \left. {\left. {\left. {U_{\varphi}{❘\alpha}} \right\rangle = {\frac{1}{\sqrt{2}}{\sum\limits_{x = 0}^{N - 1}{{a_{0}(x)}\left\lbrack {e^{2i{\varphi(x)}}{❘{0,x}}} \right.}}}} \right\rangle + {e^{{- 2}i{\varphi(x)}}{❘{1,x}}}} \right\rangle \right\rbrack,$ U_(φ)❘β⟩ = ❘Ψ₀⟩, U_(φ)^(†)❘Ψ₀⟩ = ❘β⟩, U_(φ)^(†)❘α⟩ = ❘Ψ₀⟩, $\left. \left. {\left. {\left. {U_{\varphi}^{\dagger}{❘\beta}} \right\rangle = {\frac{1}{\sqrt{2}}{\sum\limits_{x = 0}^{N - 1}{{a_{0}(x)}\left\lbrack {e^{{- 2}i{\varphi(x)}}{❘{0,x}}} \right.}}}} \right\rangle + {e^{2i{\varphi(x)}}{❘{1,x}}}} \right\rangle \right\rbrack.$

A person of skill in the art will immediately recognize that the subspace spanned by the states |Ψ₀

, |α

, and |β

is almost stable under the action of S_(Ψ) ₀ , U_(φ), and U_(φ) ^(†). Only the actions of U_(φ) on |α

and |β

may take the state of the system out of this subspace. Continuing to refer to FIGS. 4 and 5 , the motivation behind alternating between using U_(φ), and U_(φ) ^(†) during the odd iterations 402 and the even iterations 404 is to keep the state of the system within the subspace spanned by |Ψ₀

, |α

, and |β

.

From the identities above, the expressions of Equations (43) may be written capturing the relevant actions of the odd iteration operator 430, 432 denoted S_(Ψ) ₀ U_(φ) and the even iteration operator 430, 434 denoted S_(Ψ) ₀ U_(φ) ^(†):

S _(Ψ) ₀ U _(φ)|Ψ₀)=2 cos(θ)|Ψ₀

−|α

,

S _(Ψ) ₀ U _(φ)|β)=|Ψ₀

,

S _(Ψ) ₀ U _(φ) ^(†)|Ψ₀)=2 cos(θ)|Ψ₀

−|β

,

S _(Ψ) ₀ U _(φ) ^(†)|α)=|Ψ₀

.  (43)

Referring now to FIG. 6 , and continuing to refer to FIGS. 4 and 5 , state diagram 600 illustrates how, from the expressions of Equation (43), the odd iteration operator 430, 432 denoted S_(Ψ) ₀ U_(φ) may map any (first) state 610 in the space spanned by |Ψ₀

and |β

to a (second) state 620 in the space spanned by |Ψ₀

and |α

. Conversely, the even iteration operator 430, 434 denoted S_(Ψ) ₀ U_(φ) ^(†) may map any state 620 in the space spanned by |Ψ₀

and |α

to a state 610 in the space spanned by |Ψ₀

and |β

. Because the algorithm 400, 500 begins with the system initialized in the state |Ψ₀

, the state of the system may oscillate between the two subspaces 610, 620 during the odd and even iterations 402, 404.

State After k Iterations:

Using Equations (27) and (43), the state |Ψ_(k)

of the two-register system after k≥0 iterations may be written, in matrix multiplication notation, as shown in Equation (44):

$\begin{matrix} {\left. {❘\Psi_{k}} \right\rangle = \left\{ {\begin{matrix} {{{\left. \left. {\left. \left\lbrack {❘\Psi_{0}} \right. \right\rangle{❘\alpha}} \right\rangle \right\rbrack\begin{bmatrix} {2{\cos(\theta)}} & 1 \\ {- 1} & 0 \end{bmatrix}}^{k}\begin{bmatrix} 1 \\ 0 \end{bmatrix}},} & {{{if}k{is}{odd}},} \\ {{{\left. \left. {\left. \left\lbrack {❘\Psi_{0}} \right. \right\rangle{❘\beta}} \right\rangle \right\rbrack\begin{bmatrix} {2{\cos(\theta)}} & 1 \\ {- 1} & 0 \end{bmatrix}}^{k}\begin{bmatrix} 1 \\ 0 \end{bmatrix}},} & {{if}k{is}{even}} \end{matrix}.} \right.} & (44) \end{matrix}$

To simplify Equation (44), let the matrix M_(θ) be defined as follows (Equation (45)):

$\begin{matrix} {M_{\theta} \equiv {\begin{bmatrix} {2{\cos(\theta)}} & 1 \\ {- 1} & 0 \end{bmatrix}.}} & (45) \end{matrix}$

Substituting Equation (45) into Equation (44) yields Equation (46), as follows:

$\begin{matrix} {\left. {❘\Psi_{k}} \right\rangle = \left\{ {\begin{matrix} {{\begin{bmatrix} \left. {❘\Psi_{0}} \right\rangle \\ \left. {❘\alpha} \right\rangle \end{bmatrix}^{T}{M_{\theta}^{k}\begin{bmatrix} 1 \\ 0 \end{bmatrix}}},} & {{{if}k{is}{odd}},} \\ {{\begin{bmatrix} \left. {❘\Psi_{0}} \right\rangle \\ \left. {❘\beta} \right\rangle \end{bmatrix}^{T}{M_{\theta}^{k}\begin{bmatrix} 1 \\ 0 \end{bmatrix}}},} & {{if}k{is}{even}} \end{matrix}.} \right.} & (46) \end{matrix}$

where the superscript T denotes transposition. M_(θ) may be diagonalized as

$\begin{matrix} {{M_{\theta} = {{S_{\theta}\begin{bmatrix} e^{{- i}\theta} & 0 \\ 0 & e^{i\theta} \end{bmatrix}}S_{\theta}^{- 1}}},} & (47) \end{matrix}$

and where the matrix S_(θ) and its inverse S_(θ) ¹ may be given by

$\begin{matrix} {\begin{matrix} {{S_{\theta} = {\frac{- i}{2\sin(\theta)}\begin{bmatrix} e^{‐{i\theta}} & e^{i\theta} \\ {- 1} & {- 1} \end{bmatrix}}},} & {S_{\theta}^{- 1} = {\begin{bmatrix} {- 1} & {- e^{i\theta}} \\ 1 & e^{{- i}\theta} \end{bmatrix}.}} \end{matrix}} & (48) \end{matrix}$

Now, M_(θ) ^(k) may be written as follows (Equation (49)):

$\begin{matrix} {M_{\theta}^{k} = {{{S_{\theta}\begin{bmatrix} e^{{- i}\theta} & 0 \\ 0 & e^{i\theta} \end{bmatrix}}S_{\theta}^{- 1}} = {{S_{\theta}\begin{bmatrix} e^{{- i}k\theta} & 0 \\ 0 & e^{ik\theta} \end{bmatrix}}{S_{\theta}^{- 1}.}}}} & (49) \end{matrix}$

From Equation (48) and Equation (49), it follows that

$\begin{matrix} {\begin{matrix} {{M_{\theta}^{k}\begin{bmatrix} 1 \\ 0 \end{bmatrix}} = {{S_{\theta}\begin{bmatrix} e^{{- i}k\theta} & 0 \\ 0 & e^{ik\theta} \end{bmatrix}}\begin{bmatrix} {- 1} \\ 1 \end{bmatrix}}} \\ {= {{S_{\theta}\begin{bmatrix} {- e^{{- {ik}}\theta}} \\ e^{ik\theta} \end{bmatrix}} = {\frac{1}{\sin(\theta)}\begin{bmatrix} {\sin\left( {\left( {k + 1} \right)\theta} \right.} \\ {{- s}{in}\left( {k\theta} \right)} \end{bmatrix}}}} \end{matrix}.} & (50) \end{matrix}$

Plugging (50) back into (46) leads to the following (Equation (51)):

$\begin{matrix} {\left. {❘\Psi_{k}} \right\rangle = \left\{ \begin{matrix} {\left. \left. {\left. {\frac{1}{\sin(\theta)}\left\lbrack {\sin\left( {\left( {k + 1} \right)\theta} \right){❘\Psi_{0}}} \right.} \right\rangle - {\sin\left( {k\theta} \right){❘\alpha}}} \right\rangle \right\rbrack,} & {{{if}k{is}{odd}},} \\ {\left. \left. {\left. {\frac{1}{\sin(\theta)}\left\lbrack {\sin\left( {\left( {k + 1} \right)\theta} \right){❘\Psi_{0}}} \right.} \right\rangle - {\sin\left( {k\theta} \right){❘\beta}}} \right\rangle \right\rbrack,} & {{if}k{is}{{even}.}} \end{matrix} \right.} & (51) \end{matrix}$

Basis State Amplitudes after k Iterations:

From Equations (16), (33), (34), and (51), the amplitudes ã_(k)(0,x) of the basis states |0,x

after k≥0 iterations may be written as follows (Equation (52)):

$\begin{matrix} {{{\overset{\sim}{a}}_{k}\left( {0,x} \right)} = {\left\langle {0,{x{❘\Psi_{k}}}} \right\rangle = \left\{ \begin{matrix} {{\frac{a_{0}(x)}{\sqrt{2}\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)} - {\sin\left( {k\theta} \right)e^{i{\varphi(x)}}}} \right\rbrack},} & {{{if}k{is}{odd}},} \\ {{\frac{a_{0}(x)}{\sqrt{2}\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)} - {\sin\left( {k\theta} \right)e^{{- i}{\varphi(x)}}}} \right\rbrack},} & {{if}k{is}{{even}.}} \end{matrix} \right.}} & (52) \end{matrix}$

Similarly, the amplitudes ã_(k)(1,x) of the basis states |1,x

may be written as follows (Equation (53)):

$\begin{matrix} {{{\overset{\sim}{a}}_{k}\left( {1,x} \right)} = {\left\langle {1,{x{❘\Psi_{k}}}} \right\rangle = \left\{ \begin{matrix} {{\frac{a_{0}(x)}{\sqrt{2}\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)} - {\sin\left( {k\theta} \right)e^{i{\varphi(x)}}}} \right\rbrack},} & {{{if}k{is}{odd}},} \\ {{\frac{a_{0}(x)}{\sqrt{2}\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)} - {\sin\left( {k\theta} \right)e^{{- i}{\varphi(x)}}}} \right\rbrack},} & {{if}k{is}{{even}.}} \end{matrix} \right.}} & (53) \end{matrix}$

These expressions may be summarized, for b∈{0,1}, as follows (Equation (54)):

$\begin{matrix} {{{\overset{\sim}{a}}_{k}\left( {b,x} \right)} = \left\{ \begin{matrix} {{\frac{a_{0}(x)}{\sqrt{2}\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)} - {\sin\left( {k\theta} \right)e^{i{\varphi(x)}}}} \right\rbrack},} & {{{{if}k} + {b{is}{odd}}},} \\ {{\frac{a_{0}(x)}{\sqrt{2}\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)} - {\sin\left( {k\theta} \right)e^{{- i}{\varphi(x)}}}} \right\rbrack},} & {{{if}k} + {b{is}{{even}.}}} \end{matrix} \right.} & (54) \end{matrix}$

Amplitudes After Ancilla Measurement. Note that the magnitudes of the amplitudes of the states |0,x

and |1,x

are equal; that is,

|ã ₁(0,x)|=|ã _(k)(1,x)|,  (55)

for all k≥0 and x∈{0, 1, . . . , N−1}. Therefore, a measurement 440 of the ancilla qubit in the first register 410 after K iterations may yield a value of either 0 or 1 with equal probability. Let |ψ_(K,b)

be the normalized state of the second register 420 after performing K iterations, followed by a measurement 440 of the ancilla qubit 410, which may yield a value b∈{0,1}. |ψ_(K,b)

may be written as follows (Equation (56)):

$\begin{matrix} {\left. {\left. {❘\psi_{K,b}} \right\rangle = {\sum\limits_{x = 0}^{N - 1}{{a_{K,b}(x)}{❘x}}}} \right\rangle,} & (56) \end{matrix}$

where a_(K,b)(x) are the normalized amplitudes of the basis states of the second register 420 (after performing K iterations and the measurement 440 of the ancilla 410). a_(K,b)(x) may simply be given by Equation (57):

a _(K,b)(x)=√{square root over (2)}/ã _(K)(b,x).  (57)

Much of the definition hereinbelow holds a) regardless of whether a measurement 440 is performed on the ancilla qubit 410 after the K iterations, and b) regardless of the value yielded by the ancilla measurement 440 (if performed). The primary goal of measuring 440 the ancilla 410 is to make the two registers 410, 420 unentangled from each other.

Basis State Probabilities After K Iterations:

Continuing to refer to FIGS. 4 and 5 , let p_(K)(x) be the probability for a measurement of the second register after K≥0 iterations to yield x. This probability may be written, in terms of the amplitudes in the “Basis State Amplitudes After K Iterations” section hereinabove, as follows (Equation (58)):

p _(K)(x)=[|ã _(K)(0,x)|² +|ã _(K)(1,x)|²]=|a _(K,0)(x)|² =|a _(K,1)(x)|².   (58)

This expression shows that the probability p_(K)(x) depends neither on whether the ancilla was measured, nor on the result of the ancilla measurement (if performed). From Equation (54), p_(K)(x) may be written as follows (Equation (59)):

$\begin{matrix} \begin{matrix} {{p_{K}(x)} = {\frac{p_{0}(x)}{\sin^{2}(\theta)}{❘{{\sin\left( {\left( {K + 1} \right)\theta} \right)} - {{\sin\left( {K\theta} \right)}e^{i{\varphi(x)}}}}❘}^{2}}} \\ {= {{\frac{p_{0}(x)}{\sin^{2}(\theta)}\left\lbrack {{\sin^{2}\left( {K\theta} \right)} + {\sin^{2}\left( {\left( {K + 1} \right)\theta} \right)} - {2\sin\left( {K\theta} \right)\sin\left( {\left( {K + 1} \right)\theta} \right)\cos\left( {\varphi(x)} \right)}} \right\rbrack}.}} \end{matrix} & (59) \end{matrix}$

A person of skill in the art will immediately recognize that the probability amplification factor p_(K)(x)/p₀(x) is monotonic in cos(φ(x)) for all K≥0. The following trigonometric identities (Equation (60)) help elucidate the K dependence of this amplification factor:

sin²(C)+sin²(C+D)=sin²(D)+2 sin(C)sin(C+D)cos(D),

2 sin(C)sin(C+D)=cos(D)−cos(2C+D).  (60)

Setting C=Kθ and D=θ, these identities may be used to rewrite Equation (59) as follows (Equation (61)):

p _(K)(x)=p ₀(x){1−λ_(K)[cos(φ(x))−cos(θ)]},  (61)

where the K-dependent factor λ_(K) is given by Equation (62):

$\begin{matrix} {{\lambda_{K} \equiv \frac{2\sin\left( {K\theta} \right)\sin\left( {\left( {K + 1} \right)\theta} \right)}{\sin^{2}(\theta)}} = {\frac{{\cos(\theta)} - {\cos\left( {\left( {{2K} + 1} \right)\theta} \right)}}{\sin^{2}(\theta)}.}} & (62) \end{matrix}$

For notational convenience, the fact that λ_(K) depends on θ is not explicitly indicated. The result in Equation (61) may be summarized as follows:

(1) Applying K iterations of the non-boolean amplitude amplification algorithm changes the probability of measuring x by a factor that is a linear function of cos(φ(x)). If the second register is initially in an equiprobable state (i.e., if p₀(x)=constant), then the probability p_(K)(x) after K iterations is itself a linear function of cos(φ(x)).

(2) If cos(φ(x))=cos(θ) for some x, the probability of a measurement of the second register yielding that x is unaffected by the algorithm.

(3) The slope of the linear dependence is −λ_(K). If λ_(K) is positive, the states with cos(φ)<cos(θ) are amplified. Conversely, if λ_(K) is negative, states with cos(φ)>cos(θ) are amplified. The magnitude of λ_(K) controls the degree to which the preferential amplification has been performed.

From Equation (62), λ_(K) is an oscillatory function of K, centered around cos(θ)/sin²(θ) with an amplitude of 1/sin²(θ) and a period of π/θ. Recalling from Equation (30) that

$\begin{matrix} {{{\sum\limits_{x = 0}^{N - 1}{{p_{0}(x)}\cos\left( {\varphi(x)} \right)}} = {{\cos(\theta)} = {\sum\limits_{x = 0}^{N - 1}{{p_{0}(x)}\cos(\theta)}}}},} & (63) \end{matrix}$

one can verify that for any K≥0, the probabilities p_(K)(x) from Equation (61) add up to 1.

From the definition of λ_(K) in Equation (62), for all K, λ_(K) is bounded from above by λ_(optimal) defined as follows (Equation (64)):

$\begin{matrix} {{\lambda_{K} \leq \lambda_{optimal} \equiv \frac{{\cos(\theta)} + 1}{\sin^{2}(\theta)}} = {\frac{1}{1 - {\cos(\theta)}}.}} & (64) \end{matrix}$

The λ_(K)=λ_(optimal) case represents the maximal preferential amplification of lower values of cos(φ) achievable by the algorithm. Let p_(optimal)(x) be the state probability function corresponding to λ_(K)=λ_(optimal). From Equation (61),

$\begin{matrix} {{p_{optimal}(x)} = {{{p_{0}(x)}\left\lbrack {1 - \frac{{\cos\left( {\varphi(x)} \right)} - {\cos(\theta)}}{1 - {\cos(\theta)}}} \right\rbrack}.}} & (65) \end{matrix}$

Note that p_(optimal)(x)=0 for inputs x with the highest possible value of cos(φ(x)), namely 1. In other words, p_(optimal) reaches the limit set by the non-negativity of probabilities, in the context of the non-boolean amplitude amplification algorithm 400, 500 described hereinabove.

Number of Iterations to Perform:

In the non-boolean amplitude amplification algorithm 400, 500 described hereinabove, the number of iterations K to perform is left unspecified. Armed with Equation (62), this aspect of the algorithm 400, 500 will now be described in detail. Higher values of λ_(K) are advantageous to preferentially amplify lower values of cos(φ). Equation (62) illustrates that λ_(K) may be monotonically increasing for K=0, 1, . . . as long as 0≤(2K+1)θ≤π+θ or, equivalently, for

$\begin{matrix} {{0 \leq K \leq \left\lfloor \frac{\pi}{2\theta} \right\rfloor},} & (66) \end{matrix}$

where └v┘ denotes the floor of v. A good approach is to stop the algorithm 400, 500 just before the first iteration that, if performed, would cause value of λ_(K) to decrease (that is, from its value after the previous iteration). This approach leads to the choice K for the number of iterations to perform, given by

$\begin{matrix} {\overset{\sim}{K} = {\left\lfloor \frac{\pi}{2\theta} \right\rfloor.}} & (67) \end{matrix}$

The corresponding value of λ_(K) for K={tilde over (K)} is given by Equation (68):

$\begin{matrix} {\lambda_{\overset{\sim}{K}} = {{\frac{1}{\sin^{2}(\theta)}\left\lbrack {{\cos(\theta)} - {\cos\left( {{\left\lfloor \frac{\pi}{2\theta} \right\rfloor 2\theta} + \theta} \right)}} \right\rbrack}.}} & (68) \end{matrix}$

The choice {tilde over (K)} in Equation (67) for the number of iterations offers an amplification iff π>2θ>0 or, equivalently, iff 0<cos(θ)<1. At one of the extremes, namely θ=π/2, one has λ_({tilde over (K)})=0. The other extreme, namely cos(θ)=1, corresponds to every state x with a non zero amplitude in the initial state |ψ₀

having cos(φ(x))=1. There is no scope for preferential amplification in this case.

Equation (68) illustrates that λ_(K) exactly equals λ_(optimal) defined in Equation (64) if π/(2θ) is a half-integer. In terms of θ, this condition may be written as follows (Equation (69)):

$\begin{matrix} {{\theta \in \left. \left\{ {\frac{\pi}{3},\frac{\pi}{5},\frac{\pi}{7},{\ldots\left( {{harmonic}{progression}} \right)}} \right\}\Rightarrow\lambda_{\overset{\sim}{K}} \right.} = {\lambda_{optimal}.}} & (69) \end{matrix}$

For generic values of θ, Equation (68) illustrates that AR satisfies the following (Equation 70)):

$\begin{matrix} {{\frac{2{\cos(\theta)}}{\sin^{2}(\theta)} \leq \lambda_{\overset{\sim}{K}} \leq \lambda_{optimal}} = {\frac{{\cos(\theta)} + 1}{\sin^{2}(\theta)}.}} & (70) \end{matrix}$

This equation may be rewritten as follows (Equation (71)):

λ_(optimal)[1−tan²(θ/2)]≤λ_({tilde over (K)})≤λ_(optimal),  (71)

using the following identity:

$\begin{matrix} {\frac{2{\cos(\theta)}}{{\cos(\theta)} + 1} = {\frac{2\left\lbrack {{\cos^{2}\left( {\theta/2} \right)} - {\sin^{2}\left( {\theta/2} \right)}} \right\rbrack}{{2{\cos^{2}\left( {\theta/2} \right)}} - 1 + 1} = {1 - {{\tan^{2}\left( {\theta/2} \right)}.}}}} & (72) \end{matrix}$

Equation (71) illustrates that for small θ, λ_(R) is approximately equal to λ_(optimal),

(θ²) relative error.

Mean and Higher Moments of Cos(φ) after K Iterations:

Let μ_(K) ^((n)) be the n-th raw moment of cos(φ(x)) for a random value of x sampled by measuring the second register after K iterations.

$\begin{matrix} {\mu_{K}^{(n)} \equiv {\sum\limits_{x = 0}^{N - 1}{{p_{K}(x)}{{\cos^{n}\left( {\varphi(x)} \right)}.}}}} & (73) \end{matrix}$

Under the notation of Equation (73), μ₀ ⁽¹⁾ is simply cos(θ). From Equation (61),μ_(K) ^((n)) may be written in terms of the initial moments (K=0) as follows (Equation (74)):

$\begin{matrix} {\begin{matrix} {\mu_{K}^{(n)} = {\sum\limits_{x = 0}^{N - 1}{{p_{0}(x)}{{\cos^{n}\left( {\varphi(x)} \right)}\left\lbrack {1 - {\lambda_{K}\left\lbrack {{\cos\left( {\varphi(x)} \right)} - {\cos(\theta)}} \right\rbrack}} \right\rbrack}}}} \\ {= {\mu_{0}^{(n)} - {\lambda_{K}\left\lbrack {\mu_{0}^{({n + 1})} - {\mu_{0}^{(n)}\mu_{0}^{(1)}}} \right\rbrack}}} \end{matrix}.} & (74) \end{matrix}$

In particular, let μ_(K) and σ_(K) ² represent the expected value and variance, respectively, of cos(φ(x)) after K iterations.

μ_(K)≡μ_(K) ⁽¹⁾,

σ_(K) ²≡μ_(K) ⁽²⁾−[μ_(K) ⁽¹⁾]².  (75)

Now, the result in Equation (74) for n=1 may be written as follows (Equation (76)):

μ_(K)−μ₀=−λ_(K)σ₀ ².  (76)

For λ_(K)>0, Equation (76) captures the reduction in the expected value of cos(φ(x)) resulting from K iterations of the algorithm 400, 500.

Cumulative Distribution Function of Cos(φ) after K Iterations:

Let F_(K) ^(cos)(y) be the probability that cos(φ(x))≤y for an x sampled as per the probability distribution p_(K). F_(K) ^(cos) is the cumulative distribution function of cos(φ) for a measurement after K iterations, and may be written as follows (Equations (77) and (78)):

$\begin{matrix} {{{F_{K}^{\cos}(y)} = {\sum\limits_{x = 0}^{N - 1}\left\lbrack {{p_{K}(x)}{1_{{\lbrack{0,\infty}})}\left\lbrack {y - {\cos\left( {\varphi(x)} \right)}} \right\rbrack}} \right\rbrack}},} & (77) \end{matrix}$ $\begin{matrix} {{{1 - {F_{K}^{\cos}(y)}} = {\sum\limits_{x = 0}^{N - 1}\left\lbrack {{p_{K}(x)}\left( {1 - {1_{{\lbrack{0,\infty}})}\left\lbrack {y - {\cos\left( {\varphi(x)} \right)}} \right\rbrack}} \right)} \right\rbrack}},} & (78) \end{matrix}$

where 1_(|0,∞)) is the Heaviside step function, which equals 0 when its argument is negative and 1 when its argument is non-negative. Using the expression for p_(K) in Equation (61), these equations may be written as follows (Equations (79) and (80)):

$\begin{matrix} {{{F_{K}^{\cos}(y)} = {{{F_{0}^{\cos}(y)}\left( {1 + {\lambda_{K}\mu_{0}}} \right)} - {\lambda_{K}{\sum\limits_{x = 0}^{N - 1}\left\{ {{p_{0}(x)}{\cos\left( {\varphi(x)} \right)}{1_{{\lbrack{0,\infty}})}\left\lbrack {y - {\cos\left( {\varphi(x)} \right)}} \right\rbrack}} \right\}}}}},} & (79) \end{matrix}$ $\begin{matrix} {{1 - {F_{K}^{\cos}(y)}} = {{\left( {1 - {F_{0}^{\cos}(y)}} \right)\left( {1 + {\lambda_{K}\mu_{0}}} \right)} - {\lambda_{K}{\sum\limits_{x = 0}^{N - 1}{\left\{ {{p_{0}(x)}{{\cos\left( {\varphi(x)} \right)}\left\lbrack {1 - {1_{{\lbrack{0,\infty}})}\left\lbrack {y - {\cos\left( {\varphi(x)} \right)}} \right\rbrack}} \right\rbrack}} \right\}.}}}}} & (80) \end{matrix}$

Every x that provides a non-zero contribution to the summation in Equation (79) satisfies cos(φ(x))≤y. This fact may be used to write Equation (81), as follows:

λ_(K)≥0⇒F _(K) ^(cos)(y)≥F ₀ ^(cos)(y)(1+λ_(K)(μ₀ −y)).  (81)

Likewise, every x that provides a non-zero contribution to the summation in Equation (80) satisfies cos(φ(x))>y. This fact may be used to write Equation (82), as follows:

λ_(K)≥0⇒1−F _(K) ^(cos)(y)≤(1−F ₀ ^(cos)(y))(1+λ_(K)(μ₀ −y)).  (82)

The inequalities in Equations (81) and (82) may be summarized as follows (Equation (83)):

λ_(K)≥0⇒F _(k) ^(cos)(y)≥F ₀ ^(cos)(y)+λ_(K) max{F ₀ ^(cos)(y)(μ₀ −y),(1−F ₀ ^(cos)(y))(y−μ ₀)},   (83)

where the max function represents the maximum of its two arguments. This equation provides a lower bound on the probability that a measurement after K iterations yields a state whose cos(φ) value is no higher than y. Derivation of stronger bounds (or even the exact expression) for F_(K) ^(cos)(y) may be possible if additional information is known about the initial distribution of cos(φ). For y≤μ₀, the first argument of the max function in Equation (83) will be active, and for y≥μ₀, the second argument will be active.

For the λ_(K)≤0 case, it can similarly be shown that

λ_(K)≤0⇒F _(K) ^(cos)(y)≤F ₀ ^(cos)(y)+λ_(K) min{F ₀ ^(cos)(y)(μ₀ −y),(1−F ₀ ^(cos)(y))(y−μ ₀)},   (84)

where the min function represents the minimum of its two arguments.

Boolean Oracle Case:

As described in the “Number of Iterations to Perform” section hereinabove, the heuristic choice for the number of iterations for the non-boolean amplitude amplification algorithm of the present invention (namely {tilde over (K)}=└π/(2θ)┘) is different from, but analogous to, the result for known boolean amplitude amplification algorithm of the prior art (namely └π/(4θ_(a))┘). Consider the parameter θ in the boolean oracle case, say θ_(bool). Let P₀ ^(good) be the probability for a measurement on the initial state |ψ₀

to yield a winning state. From Equation (30),

$\begin{matrix} {{{\cos\left( \theta_{bool} \right)} = {{\left\lbrack {{- 1} \times P_{0}^{good}} \right\rbrack + \left\lbrack {1 \times \left( {1 - P_{0}^{good}} \right)} \right\rbrack} = {1 - {2P_{0}^{good}}}}},} & (85) \end{matrix}$ $\begin{matrix} {\left. \Rightarrow{\sin^{2}\left( {\theta_{bool}/2} \right)} \right. = {P_{0}^{good}.}} & (86) \end{matrix}$

Thus, in the boolean oracle case, sin²(θ/2) reduces to the initial probability of “success” (that is, measuring a winning state), which is captured by sin²(θ_(a)) in known boolean amplitude amplification algorithm(s). The parameter θ used herein reduces to the parameter 2θ_(a) used in known boolean amplitude amplification algorithm(s), and └π/(2θ)┘ reduces to └π/(4θ_(a))┘.

In this way, the results of the “Analysis of the Non-Boolean Amplitude Amplification Algorithm” section hereinabove in general, and the “Number of Iterations to perform” section hereinabove in particular, may be seen as generalizations of the corresponding results in known boolean amplitude amplification algorithm(s) as described hereinabove.

Alternative Formulation of the Algorithm:

Referring again to FIGS. 4 and 5 , in the formulation of the non-boolean amplitude amplification algorithm 400, 500 of the present invention, an ancilla qubit (first register) 410 may be included for the purpose of making the quantity

Ψ₀|U_(φ)|Ψ₀

=

Ψ₀|α

real valued. If, in a particular use case, it is guaranteed that

ψ₀|U_(φ)|ψ₀

will be real-valued (or have a negligible imaginary part, for example, and without limitation, by replacing the function φ(x) with φ′(x)=r(x)φ(x), where r: {0, 1, . . . N−1}→{−1,+1} is a random function independent of φ(x), with mean 0 (for x sampled by measuring |ψ₀

) even without introducing the ancilla 410, then the algorithm 400, 500 described above may be used without the ancilla 410: that is, may alternate between applying operator 430, 432 denoted S_(ψ) ₀ U_(φ) during the odd iterations and applying operator 430, 434 denoted S_(ψ) ₀ U_(φ) ^(†) during the even iterations. In other words, the properties and structure of two-register system are not exploited in the algorithm description, beyond making

Ψ₀|U_(φ)|Ψ₀

real-valued.

However, Equations (33) and (34) illustrate that the states |α

=U_(φ)|Ψ₀

and |β

=U_(φ) ^(†)|Ψ₀

are related by

|β

=[X⊗I]|α

,|α

=[X⊗I]|β

,  (87)

where X is the bit-flip or the Pauli-X operator 340. This relation may be exploited to avoid having two separate cases—k being odd and even—in the final expression for |Ψ_(k)

in Equation (51). The expression for both cases may be made the same by acting the Pauli-X gate 340 on the ancilla 410, once at the end, if the total number of iterations is even.

More interestingly, the relationship between |α

and |β

may be used to avoid having two different operations in the first place, for the odd and even iterations. This leads to the following alternative formulation of the non-boolean amplitude amplification algorithm: During each iteration, odd or even, act the same operator Q_(iter) defined by

Q _(iter) ≡S _(Ψ) ₀ U _(φ)[X⊗I].  (88)

This alternative formulation is depicted as a circuit 700 in FIG. 7 and as a pseudocode 800 in FIG. 8 .

From Equations (43) and (87), the action of Q_(iter) on and |α

may be derived as follows (Equations (89) and (90)):

$\begin{matrix} {\left. {{{\left. {{{\left. {{{\left. {{Q_{iter}❘}\Psi_{0}} \right\rangle = {S_{\Psi_{0}}U_{\varphi}}}❘}\Psi_{0}} \right\rangle = {2{\cos(\theta)}}}❘}\Psi_{0}} \right\rangle -}❘}\alpha} \right\rangle,} & (89) \end{matrix}$ $\begin{matrix} {\left. {{{\left. {{{\left. {{Q_{iter}❘}\alpha} \right\rangle = {S_{\Psi_{0}}U_{\varphi}}}❘}\beta} \right\rangle =}❘}\Psi_{0}} \right\rangle.} & (90) \end{matrix}$

Let |Ψ_(k) ^(alt)

be the state of the two-register system after k iterations under this alternative formulation 700, 800 (before any measurement of the ancilla 410), as follows (Equation (91)):

|Ψ_(k) ^(alt))≡Q _(iter) ^(k)|Ψ₀

.  (91)

Using similar manipulations as those leading to Equation (51) hereinabove, |Ψ_(k) ^(alt)) may be expressed, for all k≥0, as follows (Equation (92)):

$\begin{matrix} {\left. \left. {\left. {\left. {❘\Psi_{k}^{alt}} \right\rangle = {\frac{1}{\sin(\theta)}\left\lbrack {{\sin\left( {\left( {k + 1} \right)\theta} \right)}{❘\Psi_{0}}} \right.}} \right\rangle - {{\sin\left( {k\theta} \right)}{❘\alpha}}} \right\rangle \right\rbrack.} & (92) \end{matrix}$

Note that this expression for |Ψ_(k) ^(alt)) is almost identical to the expression for |Ψ_(k)

in Equation (51), but without two separate cases for the odd and even values of k. Much of the analysis of the original formulation of the non-boolean amplitude amplification algorithm 400, 500 described hereinabove holds for the alternative formulation 700, 800 described hereinabove as well, including the expressions for the state probabilities p_(K)(x), mean μ_(K), raw moments λ_(K) ^((n)), and the cumulative distribution function F_(K) ^(cos).

In addition to simplifying the amplification algorithm (by using the same operation for every iteration), the Q_(iter) operator used in algorithms 700, 800 allows for a clearer presentation of the quantum mean estimation algorithm, as described hereinbelow.

Quantum Mean Estimation Algorithm:

A quantum mean estimation algorithm according to certain embodiments of the present invention may operate to estimate the expected value of e^(iφ(x)) for x sampled by measuring a given superposition state |ψ₀

. Let E_(ψ) ₀ [e^(iφ)] denote this expected value, as follows (Equation (93)):

$\begin{matrix} {{{E_{\psi_{0}}\left\lbrack e^{i\varphi} \right\rbrack} \equiv \left\langle {\psi_{0}{❘U_{\varphi}❘}\psi_{0}} \right\rangle} = {\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}{e^{i{\varphi(x)}}.}}}} & (93) \end{matrix}$

This equation may be written as follows (Equation (94)):

E _(ψ) ₀ [e ^(iφ)]=Re[E _(ψ) ₀ [e ^(iφ)]]+i Im[E _(ψ) ₀ [e ^(iφ)]],  (94)

where the real and imaginary parts are given by Equations (95) and (96), respectively, as follows:

$\begin{matrix} {{{{Re}\left\lbrack {E_{\psi_{0}}\left\lbrack e^{i\varphi} \right\rbrack} \right\rbrack} = {\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}{\cos\left( {\varphi(x)} \right)}}}},} & (95) \end{matrix}$ $\begin{matrix} {{{Im}\left\lbrack {E_{\psi_{0}}\left\lbrack e^{i\varphi} \right\rbrack} \right\rbrack} = {\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}{{\sin\left( {\varphi(x)} \right)}.}}}} & (96) \end{matrix}$

The mean estimation may therefore be performed in two parts: one for estimating the mean of cos(φ), and the other for estimating the mean of sin(φ). Note that the expectation of cos(φ) under the state |ψ₀

is precisely cos(θ) defined in Equation (30).

Estimating the Mean of cos(φ):

The connection shown in the “Boolean Oracle Case” section hereinabove between the parameter θ and the parameter θ_(a) serves as the intuition behind the quantum mean estimation algorithm of the present invention. In the known boolean amplitude estimation algorithm described hereinabove, the parameter θ_(a) is estimated using QPE (Note: The estimation of θ_(Q) is only (needed to be) performed up to a two-fold ambiguity of {θ_(a),π−θ_(a)}). The estimate for θ_(a) is then turned into an estimate for the initial winning probability. The non-boolean quantum mean estimation algorithm of the present invention may operate to estimate the parameter θ defined in Equation (30) using QPE (Note: The estimation of θ is only (needed to be) performed up to a two fold ambiguity of {θ,2π−θ}). The estimate for θ may then be translated into an estimate for the initial expected value of cos(φ(x)), namely cos(θ).

Toward the end of actualizing the abovementioned intuition into a working algorithm, a key observation is that |Ψ

may be written as follows (Equation (97)):

$\begin{matrix} {{\left. {❘\Psi_{0}} \right\rangle = \frac{\left. {{{\left. {❘\eta_{+}} \right\rangle -}❘}\eta_{-}} \right\rangle}{\sqrt{2}}},} & (97) \end{matrix}$

where |η₊

and |η⁻

are given by Equation (98):

$\begin{matrix} {\left. {❘\eta_{\pm}} \right\rangle = {\frac{\left. {{{\left. {e^{{\pm i}\theta}{❘\Psi_{0}}} \right\rangle -}❘}\alpha} \right\rangle}{i\sqrt{2}\sin(\theta)}.}} & (98) \end{matrix}$

Note: The forms of the eigenstates |η₊

and |η⁻

in Equation (98) may be determined from the form of the matrix S_(θ) in Equation (48). These forms may also be determined from Equation (92) by rewriting the sin functions in terms of complex exponential functions.

The expressions for |η₊

and |η⁻

in Equation (98) may be used to verify Equation (97). Crucially, |η₊

and |η⁻

are unit normalized eigenstates of the unitary operator Q_(iter), with eigenvalues e^(iθ) and e^(−iθ), respectively.

Q _(iter)|η_(±)

=e ^(±iθ)|η_(±)

,  (99)

η_(±)|η_(±)

=1.  (100)

The properties of |η₊

and |η⁻

in Equation (99) and Equation (100) may be verified using Equation (89), Equation (90), and Equation (98). The observations in Equation (97) and Equation (99) lead to the following algorithm for estimating cos(θ):

(1) Perform the QPE algorithm with a) the two-register operator Q_(iter) serving the role of the unitary operator under consideration, and b) the superposition state |Ψ₀) in place of the eigenstate required by the QPE algorithm as input. Let the output of this step, appropriately scaled to be an estimate of the phase angle in the range [0,2π), be {circumflex over (ω)}.

(2) Return cos({circumflex over (ω)}) as the estimate for cos(θ) (i.e., the real part of E_(ψ) ₀ [e^(iφ)]). Note: If the circuit implementation of Q_(iter) is wrong by an overall (state independent) phase ϕ_(err), then the estimate for cos(θ) is cos({circumflex over (ω)}−ϕ_(err)). This is important, for example, if the operation [2|0,0

0,0|−I] is only implemented up to a factor of −1 (i.e., with ϕ_(err)=π). Note that the final state probabilities under the non-boolean amplitude amplification algorithm are unaffected by such an overall phase error.

Proof of correctness of the algorithm: |Ψ₀

is a superposition of the eigenstates |η₊

and |η⁻

of the unitary operator Q_(iter). This implies that {circumflex over (ω)} may either be an estimate for the phase angle of |η₊

, namely θ, or an estimate for the phase angle of |η⁻

, namely 2π−θ. (Note: If θ=0, the phase angle being estimated is 0 for both |η₊

and |η⁻

. For θ≠0, {circumflex over (ω)} will be an estimate for either θ or 2π−θ with equal probability. Since θ lies in [0,π] and 2π−θ lies in [π,2π], the output {circumflex over (ω)} can be converted into an estimate for θ alone (although doing so is not necessary)). Since, cos(2π−θ)=cos(θ), it follows that cos({circumflex over (ω)}) is an estimate for cos(θ).

Estimating the Mean of e^(iφ):

The algorithm for estimating the expected value of cos(φ) in the section hereinabove may be re-purposed to estimate the expected value of sin(φ) by using the fact that

sin(φ)=cos(φ−π/2).  (101)

In other words, the imaginary part of E_(ψ) ₀ [e^(iφ)] is the real part of E_(ψ) ₀ [e^(i(φ−π/2))]. By using the oracle U_(φ−π/2) (for the function φ−π/2), instead of U_(φ), in the mean estimation algorithm of the preceding section, the imaginary part of E_(ψ) ₀ [e^(iφ)] may also be estimated. This completes the estimation of E_(ψ) ₀ [e^(iφ)].

For concreteness, U_(φ−π2) may be explicitly written as

U _(φ−π/2) =e ^(−iπ/2)|0

0|⊗U _(φ) +e ^(iπ/2)|1

1|⊗U _(φ) ^(†).  (102)

Referring now to FIG. 9 , exemplary circuit 900 illustrates implementation of U_(φ−π/2) using the oracle 932 denoted U_(φ), the bit-flip operator 940 denoted X, and the phase-shift operator R_(ϕ) (shown as elements 950, 952).

Note that the algorithm does not use the knowledge that {|0

, . . . , |N−1

} is an eigenbasis of U_(φ). Therefore, this algorithm may be used to estimate

ψ₀|U|ψ₀

for any unitary operator U.

Quantum Speedup:

The speedup offered by the quantum mean estimation algorithm 900 over classical methods will now be discussed in detail, in the context of estimating the mean of cos(φ) alone. This discussion may be extended in a straightforward way to estimation of E_(ψ) ₀ [e^(iφ)].

Classical Approaches to Estimating the Mean: For an arbitrary function φ and a known sampling distribution p₀(x) for the inputs x, one classical approach to finding the mean of cos(φ(x)) is to sequentially query the value of φ(x) for all the inputs and use the query results to compute the mean. Let the permutation (x₀, x₁, . . . , x_(N-1)) of the inputs (0, 1, . . . , N−1) be the order in which the inputs are queried. The range of allowed values of cos(θ), based only on results for the first q inputs, is given by the following (Equation (103)):

$\begin{matrix} {\left\lbrack {{\sum\limits_{j = 0}^{q - 1}{{p_{0}(x)}\cos\left( {\varphi\left( x_{j} \right)} \right)}} - {\sum\limits_{j = q}^{N - 1}{p_{0}(x)}}} \right\rbrack \leq {\cos(\theta)} \leq {\left\lbrack {{\sum\limits_{j = 0}^{q - 1}{{p_{0}(x)}\cos\left( {\varphi\left( x_{j} \right)} \right)}} + {\sum\limits_{j = q}^{N - 1}{p_{0}(x)}}} \right\rbrack.}} & (103) \end{matrix}$

These bounds are derived by setting the values of cos(φ) for all the unqueried inputs to their highest and lowest possible values, namely +1 and −1. The range of allowed values of cos(θ) shrinks as more and more inputs are queried. In particular, if p₀(x) is equal for all the inputs x, the width of the allowed range (based on q queries) is given by 2(N−q)/N. This strategy may take

(N) queries before the width of the allowed range reduces to even, say, 1. Thus, this strategy will not be feasible for large values of N.

An alternative classical approach is to probabilistically estimate the expected value as follows:

(1) Independently sample q random inputs (x₁, . . . x_(q)) as per the distribution p₀.

(2) Return the sample mean of cos(φ) over the random inputs as an estimate for cos(θ).

Under this approach, the standard deviation of the estimate scales as ˜σ₀/√{square root over (q)}, where σ₀ is the standard deviation of cos(φ) under the distribution p₀.

Precision Vs Number of Queries for the Quantum Algorithm: Note that one call to the operator Q_(iter) corresponds to

(1) calls to A₀ and U_(φ) (and their inverses). Let q be the number of times the (controlled) Q_(iter) operation is performed during the QPE subroutine. As q increases, the uncertainty on the estimate for the phase-angle θ (up to a two-fold ambiguity) falls at the rate of

(1/q). Consequently, the uncertainty on cos(θ) also falls at the rate of

(1/q). This represents a quadratic speedup over the classical, probabilistic approach, under which the error falls as

(1/√{square root over (q)}).

Note that the variance of the estimate for cos(θ) is independent of a) the size of input space N, and b) the variance σ₀ ² of cos(φ(x)) under the distribution p₀(x). It only depends on the true value of cos(θ) and the number of queries q performed during the QPE subroutine.

Demonstrating the Algorithms Using a Toy Example

Referring again to FIGS. 4, 5, and 9 , the non-boolean amplitude amplification algorithm 400, 500 and the mean estimation algorithm 900 will both be demonstrated using a toy example. Let the input to the oracle U_(φ) (i.e., the second register 420), contain 8 qubits. This leads to 2⁸=256 basis input states, namely |0

, . . . , |255

. Let the toy function φ(x) be

$\begin{matrix} \begin{matrix} {{{\varphi(x)} = {\frac{x}{255}\frac{\pi}{4}}},} & {{{{for}{}x} = 0},1,\ldots,255.} \end{matrix} & (104) \end{matrix}$

The largest phase-shift applied by the corresponding oracle 432 denoted U_(φ) on any basis state is π/4, for the state |255

. Since, cos(φ(x)) is monotonically decreasing in x, the goal of the amplitude amplification algorithm 400, 500 is to amplify the probabilities of higher values of x.

Let the initial state, from which the amplification is performed, be the uniform superposition state |s

.

$\begin{matrix} {\left. {\left. {\left. {❘\psi_{0}} \right\rangle = {❘s}} \right\rangle = {\frac{1}{\sqrt{256}}{\sum\limits_{x = 0}^{255}{❘x}}}} \right\rangle.} & (105) \end{matrix}$

Such simple forms for the oracle function and the initial state allow for a good demonstration of the algorithms of the present invention.

For this toy example, from Equation (30), cos(θ) and θ are given by

$\begin{matrix} \begin{matrix} {{{\cos(\theta)} = {{\frac{1}{256}{\sum\limits_{x = 0}^{255}{\cos\left( {\frac{x}{255}\frac{\pi}{4}} \right)}}} \approx 0.9001}},} \\ {\theta \approx {0.45{7.}}} \end{matrix} & (106) \end{matrix}$

Referring now to FIG. 10 , graph 1000 shows the value 1010 of λ_(K), from Equation (62), for the first few of a range 1020 of values of K (more specifically, for K=0, 1, . . . , 14). The dots 1030 (only a subset labeled, for clarity) correspond to the different integer values 1020 of K. The black solid curve 1040 depicts the sinusoidal dependence of the value 1010 of λ_(K) on the range 1040 of K. The dotted lines 1050 indicate that the value 1010 of λ_(K) oscillates around a reference 1060 of cos(θ)/sin²(θ) with an amplitude 1070 of 1/sin²(θ) and a period 1080 of π/θ (in K values). The heuristic choice for the total number of iterations {tilde over (K)}=[π/(2θ)] is 3 for this example.

Amplitude Amplification:

Continuing with the toy example, and referring now to chart 1100 of FIG. 11 , the quantum circuit for the non-boolean amplitude amplification algorithm 400, 500 was implemented in a quantum computing framework for three different values of the total number of iterations K, namely K=1, 2, and 3. The solid histograms 1130, 1140, 1150 show the observed measurement frequencies 1110 of the different values 1120 of x∈{0, 1 . . . , 255} after performing the non-boolean amplitude amplification algorithm 400, 500. The solid histograms 1130, 1140, 1150 correspond to the total number of iterations K being 1, 2, and 3, respectively. In each case, the observed frequencies are based on simulating (and measuring) the circuit for the algorithm 10⁶ times (i.e., 10⁶ shots). The dashed curves 1132, 1142, 1152, in good agreement (almost coincident) with their corresponding solid histograms 1130, 1140, 1150, respectively, show the predictions p_(K)(x) (for the measurement frequencies) computed using Equation (61). While p_(K)(x) may be technically defined only for the integer values of x, in FIG. 11 the dashed curves 1132, 1142, 1152 are interpolated for non-integer values of x using Equation (61).

As can be seen from FIG. 11 , in each case, the algorithm 400, 500 preferentially amplifies lower values of cos(φ(x)) or, equivalently, higher values of x. This result is expected from the fact that λ_(K)>0 for all three values of K. Furthermore, as K increases from 0 to {tilde over (K)}=3, the preferential amplification grows stronger. Note that the probabilities of the x-s for which cos (Φ(x))≈cos(θ) are left approximately unchanged by the algorithm, as indicated by the dotted crosshair 1160.

Mean Estimation:

Continuing with the toy example, and referring now to graphs 1200, 1250 of FIG. 12 , results of demonstrating the quantum circuit for the non-boolean mean estimation algorithm 900 will now be described in detail. Only the estimation of cos(θ) (i.e., the real part of E_(ψ) ₀ [e^(iφ)]) is demonstrated herein. The imaginary part may also be estimated using the same technique, as described in “Estimating the Mean of e^(iφ)” hereinabove.

Let M be the number of qubits used in the QPE subroutine of the mean estimation algorithm 900, to contain the phase information. This corresponds to performing the (controlled) Q_(iter) operation 2^(M)−1 times during the QPE subroutine. Note that the estimated phase {circumflex over (ω)} may only take the following discrete values:

$\begin{matrix} {\overset{\hat{}}{\omega} \in {\left\{ {\frac{2\pi j}{2^{M}}\ {❘\ {j \in \left\{ {0,\ldots,{2^{M} - 1}} \right\}}}} \right\}.}} & (107) \end{matrix}$

In this way, the value of M controls the precision of the estimated phase and, by extension, the precision of the estimate for cos(θ); the higher the value of M, the higher the precision.

For the demonstration, two different quantum circuits were implemented, again using a quantum computing framework, for the mean estimation algorithm 900; one with M=4 and the other with M=8. Each circuit was simulated (and measured) 10⁶ times, to get a sample of {circumflex over (ω)} values all in the range [0,2π).

The observed frequencies 1210 (scaled by 1/bin-width) of the different values 1220 of {circumflex over (ω)} are shown as histograms on a linear scale in top graph 1200, and on a logarithmic scale in the bottom graph 1250. Here the bin-width of the histograms is given by 2π/2^(M), which is the difference between neighboring allowed values of {circumflex over (ω)}.

The dashed histogram 1230 and solid histogram 1240 correspond to the circuits with 4 and 8 phase measurement qubits, respectively. The exact values of θ and 2π−θ for the toy example are indicated with vertical dotted lines 1232, 1242, respectively. In both cases (M=4 and M=8), the observed frequencies peak near the exact values of θ and 2π−θ, demonstrating that {circumflex over (ω)} is a good estimate for them, up to a two-fold ambiguity. (Note: The upward trends near the left (−1) and right (+1) edges of the plots in are artifacts caused by the Jacobian determinant for the map from {circumflex over (ω)} to cos({circumflex over (ω)})). Furthermore, as expected, using more qubits for estimating the phase leads to a more precise estimate.

Ancilla-Free Versions of the Algorithms:

Both algorithms introduced this in this paper so far, namely (1) the amplitude algorithm of FIGS. 4 and 5 and its alternative formulation in FIG. 8 , and (2) the mean estimation algorithm of FIG. 9 , use an ancilla qubit to make the quantity

Ψ₀|U_(φ)|Ψ₀

real valued. This is important for achieving the respective goals of the algorithms. However, the same algorithms may be performed without the ancilla, albeit to achieve different goals, which may be relevant in some use cases.

Ancilla-Free Non-Boolean Amplitude Amplification:

The ancilla-free version of the amplitude amplification algorithm is almost identical to the algorithm introduced hereinabove at FIGS. 4 and 5 . The only difference is that, in the ancilla-free version, the single-register operators S_(ψ) ₀ , U_(φ), and U_(φ) ^(†) are used in place of the two-register operators S_(Ψ) ₀ , U_(φ), and U_(φ) ^(†), respectively. For concreteness, the ancilla-free algorithm may proceed as follows:

(1) Initialize a system in the state |ψ₀

.

(2) Act the operation S_(ψ) ₀ U_(φ) during the odd iterations and S_(ψ) ₀ U_(φ) ^(†) during the even iterations.

Analogous to the two-register states |α

and |β

in Equations (31) and (32), let the single-register states |α′

and |β′

be defined as

$\begin{matrix} \begin{matrix} \left. {{{\left. {2{❘\alpha^{\prime}}} \right\rangle \equiv U_{\varphi}}❘}\psi_{0}} \right\rangle & {\left. {= {\sum\limits_{x = 0}^{N - 1}{e^{i{\varphi(x)}}a_{0}(x){❘x}}}} \right\rangle,} \\ \left. {{{\left. {❘\beta^{\prime}} \right\rangle \equiv U_{\varphi}^{\dagger}}❘}\psi_{0}} \right\rangle & {\left. {= {\sum\limits_{x = 0}^{N - 1}{e^{{- i}{\varphi(x)}}{a_{0}(x)}{❘x}}}} \right\rangle.} \end{matrix} & (108) \end{matrix}$

Analogous to θ defined in Equation (30), let θ′∈[0,π/2] and δ∈[0,2π) be implicitly defined by

$\begin{matrix} {{{\cos\left( \theta^{\prime} \right)e^{i\delta}} \equiv \left\langle {\psi_{0}{❘\alpha^{\prime}}} \right\rangle} = {\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}{e^{i{\varphi(x)}}.}}}} & (109) \end{matrix}$

Variables cos(θ′) and δ are the magnitude and phase, respectively, of the initial (i.e., x sampled from |ψ₀

) expected value of e^(iφ). An important difference between θ′ and θ is that cos(θ′) is restricted to be non-negative, unlike cos(θ), which may be positive, negative, or zero.

Note that cos(θ′) may be written as

$\begin{matrix} {{{\cos\left( \theta^{\prime} \right)} = {\sum\limits_{x = 0}^{N - 1}{{❘{a_{0}(x)}❘}^{2}e^{i{{\varphi\prime}(x)}}}}},} & (110) \end{matrix}$

where φ′(x) is given by

φ′(x)≡φ(x)−δ.  (111)

Acting the oracle U_(φ) for the function φ may be thought of as acting the oracle U_(φ′) for the function φ′, followed by performing a global, state independent phase-shift of δ. Furthermore, from Equation (120), it can be seen that

ψ₀|U_(φ′)|ψ₀

is real-valued. This observation may be used to re-purpose the analysis in the “Analysis of the Non-Boolean Amplitude Amplification Algorithm” section hereinabove for the ancilla-free version; the corresponding results are presented here without explicit proofs.

Let |ψ_(k)

be the state of the system of the after k≥0 iterations of the ancilla-free algorithm. Analogous to Equation (51), |ψ′_(k)

may be written as

$\begin{matrix} {\left. {❘\psi_{k}^{\prime}} \right\rangle = \left\{ \begin{matrix} {\left. \left. {\left. {\frac{e^{i\delta}}{\sin\left( {\theta'} \right)}\left\lbrack {\sin\left( {\left( {k + 1} \right)\theta^{\prime}} \right){❘\psi_{0}}} \right.} \right\rangle - {\sin\left( {k\theta^{\prime}} \right)e^{{- i}\delta}{❘\alpha^{\prime}}}} \right\rangle \right\rbrack,} & {{{if}\ k\ {is}\ {odd}},} \\ {\left. \left. {\left. {\frac{1}{\sin\left( \theta^{\prime} \right)}\left\lbrack {\sin\left( {\left( {k + 1} \right)\theta^{\prime}} \right){❘\psi_{0}}} \right.} \right\rangle - {\sin\left( {k\theta^{\prime}} \right)e^{i\delta}{❘\beta^{\prime}}}} \right\rangle \right\rbrack\ ,} & {{if}\ k\ {is}\ {{even}.}} \end{matrix} \right.} & (112) \end{matrix}$

Let p′_(K)(x) be the probability of measuring the system in state x after K iterations. Analogous to Equation (61), p′_(K)(x) can be written as follows (Equation (113)):

p′ _(K)(x)=p ₀(x){1−λ′_(K)[cos(φ(x)−δ)−cos(θ′)]},  (113)

where the λ′_(K), the ancilla-free analogue of λ_(K), is given by

$\begin{matrix} {\lambda_{K}^{\prime} = {\frac{2\sin\left( {K\theta^{\prime}} \right)\sin\left( {\left( {K + 1} \right)\theta^{\prime}} \right)}{\sin^{2}\left( \theta^{\prime} \right)} = {\frac{{\cos\left( \theta^{\prime} \right)} - {\cos\left( {\left( {{2K} + 1} \right)\theta^{\prime}} \right)}}{\sin^{2}\left( \theta^{\prime} \right)}.}}} & (114) \end{matrix}$

In this case, the probability amplification factor p′_(K)/p₀ is linear in cos(φ−δ).

Ancilla-Free Mean Estimation:

The ancilla-free mean estimation algorithm described in this subsection may estimate the magnitude of

ψ₀|U|ψ₀

for a given unitary operator U. Hereinbelow the algorithm is presented in terms of the oracle U_(φ), and the goal of the algorithm is to estimate cos(θ′) from Equation (109) (i.e., the magnitude of E_(ψ) ₀ [e^(iφ)]≡

ψ₀|U_(φ)|ψ₀

).

Let the unitary operator Q_(evenodd) be defined as follows (Equation 115)):

Q _(evenodd) ≡S _(ψ) ₀ U _(φ) S _(ψ) ₀ U _(φ) ^(†).  (115)

Its action corresponds to performing the (ancilla-free) even-iteration operation once, followed by the odd-iteration operation. Analogous to Equations (97) and (98), the state |ψ₀

can be written as

$\begin{matrix} {{\left. {❘\psi_{0}} \right\rangle = \frac{\left. {\left. {❘\eta_{+}^{\prime}} \right\rangle -} \middle| \eta_{-}^{\prime} \right\rangle}{\sqrt{2}}},} & (116) \end{matrix}$

where |η′₊

and |η″⁻

are given by

$\begin{matrix} {\left. {❘\eta_{\pm}^{\prime}} \right\rangle = {\frac{\left. {\left. {e^{{\pm i}\theta\prime}{❘\psi_{0}}} \right\rangle - {e^{{- i}\delta}{❘\alpha^{\prime}}}} \right\rangle}{i\sqrt{2}\sin\left( \theta^{\prime} \right)}.}} & (117) \end{matrix}$

|η′₊

and |η′⁻

are unit-normalized eigenstates of Q_(evenodd) with eigenvalues e^(2iθ), and e^(−2iθ), respectively.

$\begin{matrix} {\left. {\left. {Q_{e{ven}{odd}}{❘\eta_{\pm}^{\prime}}} \right\rangle = {e^{{\pm 2}i\theta\prime}{❘\eta_{\pm}^{\prime}}}} \right\rangle,} & (118) \end{matrix}$ $\begin{matrix} {\left\langle {\eta_{\pm}^{\prime}{❘\eta_{\pm}^{\prime}}} \right\rangle = {1.}} & (119) \end{matrix}$

The observations in Equations (118) and (119) lead to the following algorithm for estimating cos(θ′):

(1) Perform the QPE algorithm with Q_(evenodd) serving the role of the unitary operator under consideration, and the superposition state |ψ₀

in place of the eigenstate required by the QPE algorithm as input. Let the output of this step, appropriately scaled to be an estimate of the phase angle in the range [0,2π), be {circumflex over (ω)}.

(2) Return |cos({circumflex over (ω)}/2)| as the estimate for cos(θ′).

In this version of the algorithm, {circumflex over (ω)} will be an estimate for either 2θ or 2π−2θ. (Note: If θ′=0, the phase angle being estimated is 0 for both |η′₊

and |η′⁻

.) So, {circumflex over (ω)}/2 will be an estimate for either θ′ or π−θ′. Since, a) cos(π−θ′)=−cos(θ′), and b) cos(θ′) is a non-negative number, it follows that |cos({circumflex over (ω)}/2)| is an estimate for cos(θ′).

Potential advantageous applications of the algorithms of the present invention may include the following:

Approximate Optimization:

A straightforward application of the non-boolean amplitude amplification algorithm of the present invention is in the optimization of objective functions defined over a discrete input space. The objective function to be optimized needs to be mapped onto the function φ of the oracle U_(φ), with the basis states of the oracle corresponding to the different discrete inputs of the objective function. After performing an appropriate number of iterations of the algorithm, measuring the state of the system will yield “good” states with amplified probabilities. Multiple repetitions of the algorithm (multiple shots) may be performed to probabilistically improve the quality of the optimization.

Note that the technique is not guaranteed to yield the true optimal input, and the performance of the technique will depend crucially on factors like a) the map from the objective function to the oracle function φ, b) the number of iterations K, c) the initial superposition |ψ₀

, and, in particular, d) the initial distribution of φ under the superposition |ψ₀

. This approach joins known quantum optimization techniques.

Simulating Probability Distributions:

The amplitude amplification algorithm may be useful for simulating certain probability distributions. By choosing the initial state |ψ₀

, oracle U_(φ), and the number of iterations K, one can control the final sampling probabilities p_(K)(x) of the basis states; the exact expression for p_(K)(x) in terms of these factors is given in Equation (61).

Estimating the Overlap Between Two States:

Let |ψ

and |ϕ

be two different states produced by acting the unitary operators A and B, respectively, on the state |0

.

|ψ

=A|0

,|ϕ

=B|0

.  (120)

Estimating the overlap |

ψ|ϕ

| between the two states is an important task with several applications, including in Quantum Machine Learning (QML). Several algorithms, including the Swap test, can be used for estimating this overlap. For the Swap test, the uncertainty in the estimated value of |

ψ|ϕ

| falls as

(1/√{square root over (q)}) in the number of queries q to the unitaries A and B (used to the create the states |ψ

and |ϕ

).

On the other hand, the mean estimation algorithm of the present invention also be used to estimate

ψ|ϕ

by noting that

ψ|ϕ

=

0|A ^(†) B|0

.  (121)

So, by setting

U≡A ^(†) B,  (122)

|ψ₀

≡|0

,  (123)

values

ψ|ϕ

may be estimated as

ψ₀|U|ψ₀

using the mean estimation algorithm of FIG. 9 . If one is only interested in the magnitude of

ψ|ϕ

, the ancilla-free version of the mean estimation algorithm described hereinabove will also suffice. Since, for the mean estimation algorithm, the uncertainty of the estimate falls as

(1/q) in the number of queries q to the unitaries A and B (or their inverses), this approach offers a quadratic speedup over the Swap test. Furthermore, the

(1/q) scaling of the error achieved by this approach matches the performance of the known optimal quantum algorithm for the overlap-estimation task.

Meta-Oracles to Evaluate the Superposition |ψ

and Unitary U:

Recall from Equations (97) and (98) that

$\begin{matrix} {{\left. {Q_{iter}{❘\Psi_{0}}} \right\rangle = \frac{\left. {\left. {e^{\overset{˙}{t}\theta}{❘\eta_{+}}} \right\rangle - {e^{{- i}\theta}{❘\eta_{-}}}} \right\rangle}{\sqrt{2}}},} & (124) \end{matrix}$

where cos(θ) is the real part of

ψ₀|U_(φ)|ψ₀

. Note that the parameter θ depends on the superposition |ψ₀

and the unitary U_(φ). The action of Q_(iter) on |Ψ₀) is to apply a phase-shift of θ on the projection along |η₊

and a phase-shift of −θ on the projection along |η⁻

. This property may be used to create a meta-oracle which evaluates the superposition |Ψ₀

and/or the unitary U_(φ) (or a generic unitary U) based on the corresponding value of θ. More specifically, if the circuit A₀ for producing |Ψ₀

and/or the circuit for U are additionally parameterized using “control” quantum registers (provided as inputs to the circuits), then a meta-oracle may be created using Equation (24) to evaluate the states of the control registers. Such meta-oracles may be used with quantum optimization algorithms, including the non-boolean amplitude amplification algorithm of the present invention, to find “good” values (or states) of the control registers.

Variational quantum circuits (i.e., quantum circuits parameterized by (classical) free parameters) have several applications, including in QML. Likewise, quantum circuits parameterized by quantum registers may also have applications (e.g., in QML and quantum statistical inference).

Some of the illustrative aspects of the present invention may be advantageous in solving the problems herein described and other problems not discussed which are discoverable by a skilled artisan.

While the above description contains much specificity, these should not be construed as limitations on the scope of any embodiment, but as exemplifications of the presented embodiments thereof. Many other ramifications and variations are possible within the teachings of the various embodiments. While the invention has been described with reference to exemplary embodiments, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the scope of the invention. In addition, many modifications may be made to adapt a particular situation or material to the teachings of the invention without departing from the essential scope thereof. Therefore, it is intended that the invention not be limited to the particular embodiment disclosed as the best or only mode contemplated for carrying out this invention, but that the invention will include all embodiments falling within the scope of the appended claims. Also, in the drawings and the description, there have been disclosed exemplary embodiments of the invention and, although specific terms may have been employed, they are unless otherwise stated used in a generic and descriptive sense only and not for purposes of limitation, the scope of the invention therefore not being so limited. Moreover, the use of the terms first, second, etc. do not denote any order or importance, but rather the terms first, second, etc. are used to distinguish one element from another. Furthermore, the use of the terms a, an, etc. do not denote a limitation of quantity, but rather denote the presence of at least one of the referenced item.

Thus, the scope of the invention should be determined by the appended claims and their legal equivalents, and not by the examples given. 

That which is claimed is:
 1. A method of performing quantum calculation on an oracle U_(φ) for a non-boolean function φ, comprising: initializing an ancilla qubit in a |+

state and an input qubit in a |ψ₀

state of a plurality of eigenstates |x

to define a two-register state |Ψ₀

≡|+,ψ₀

; for each of a plurality K of iterations receiving, using the input qubit, a respective one of the plurality of eigenstates |x

defining an input basis state, for odd iterations, acting on the input basis state using a selective phase-flip unitary operator circuit S_(Ψ) ₀ and a controlled unitary operator circuit U_(φ), and for even iterations, acting on the input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and a controlled inverse unitary operator circuit U_(φ) ^(†).
 2. The method according to claim 1, further comprising measuring, after the plurality K of iterations, the ancilla qubit in a 0/1 basis.
 3. The method according to claim 1, wherein the selective phase-flip unitary operator circuit S_(Ψ) ₀ further comprises: a Hadamard transform H, a unitary operator A₀, a unitary operator I, and an inverse unitary operator A₀ ^(†); wherein the selective phase-flip unitary operator S_(Ψ) ₀ =[H⊗A₀][2|0,0

0,0|−I][H⊗A₀ ^(†)].
 4. The method according to claim 1, wherein the acting on the input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and the controlled unitary operator circuit U_(φ) further comprises, for the ancilla qubit in a state |0

, acting on the input qubit as U_(φ)|0,x

=e^(+iφ(x))|0,x

, U_(φ)|1,x

=e^(−iφ(x))|1,x

.
 5. The method according to claim 1, wherein the acting on the input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and the controlled inverse unitary operator circuit U_(φ) ^(†) further comprises, for the ancilla qubit in a state |1

, acting on the input qubit as U_(φ) ^(†)|0,x

=e^(+iφ(x))|0,x

, U_(φ) ^(†)|1,x

=e^(−iφ(x))|1,x

.
 6. The method according to claim 1, further comprising: receiving, using the input qubit, the |ψ₀

state defining an input random state; acting on the input random state using a controlled estimation unitary operator circuit U_(φ−π/2).
 7. The method according to claim 6, wherein the controlled estimation unitary operator circuit U_(φ−π/2) further comprises: the controlled unitary operator circuit U_(φ), at least one bit-flip operator X, and at least one phase-shift operator R_(ϕ); wherein the controlled estimation unitary operator circuit U_(φ−π/2)=e^(−iπ/2)|0

0|⊗U_(φ)+e^(iπ/2)|1

1|⊗U_(φ) ^(†).
 8. A quantum computing device for performing quantum calculation on an oracle U_(φ) for a non-boolean function φ, comprising: a two-register quantum system comprising an ancilla qubit, and an input qubit; and a non-boolean quantum oracle comprising a selective phase-flip unitary operator circuit S_(Ψ) ₀ , a controlled unitary operator circuit U_(φ), and a controlled inverse unitary operator circuit U_(φ) ^(†); wherein the quantum computing device is configured to initialize the ancilla qubit in a |+

state and the input qubit in a |ψ₀

state of a plurality of eigenstates |x

to define a two-register state |Ψ₀

≡|+,ψ₀

; for each of a plurality K of iterations receive, using the input qubit, a respective one of the plurality of eigenstates |x

defining an input basis state, for odd iterations of the plurality K of iterations, act on the input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and the controlled unitary operator circuit U_(φ), and for even iterations of the plurality K of iterations, act on the input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and the controlled inverse unitary operator circuit U_(φ) ^(†).
 9. The quantum computing device according to claim 8, further configured to measure, after the plurality K of iterations, the ancilla qubit in a 0/1 basis.
 10. The quantum computing device according to claim 8, wherein the selective phase-flip unitary operator circuit S_(Ψ) ₀ further comprises: a Hadamard transform H, a unitary operator A₀, a unitary operator I, and an inverse unitary operator A₀ ^(†); wherein the selective phase-flip unitary operator S_(Ψ) ₀ =[H⊗A₀][2|0,0

0,0|−I][H⊗A₀ ^(†)].
 11. The quantum computing device according to claim 8, further configured, for the ancilla qubit in a state |0

, to act on the input qubit as U_(φ)|0,x

=e^(+iφ(x))|0,x

, U_(φ)|1,x

=e^(−iφ(x))|1,x

.
 12. The quantum computing device according to claim 8, further configured, for the ancilla qubit in a state |1

, to act on the input qubit as U_(φ) ^(†)|0,x

=e^(+iφ(x))|0,x

, U_(φ) ^(†)|1,x

=e^(−iφ(x))|1,x

.
 13. The quantum computing device according to claim 8, further comprising a controlled estimation unitary operator circuit U_(φ−π/2), and configured to: receive, using the input qubit, the |ψ₀

state defining an input random state; and act on the input random state using the controlled estimation unitary operator circuit U_(φ−π/2).
 14. The quantum computing device according to claim 13, wherein the controlled estimation unitary operator circuit U_(φ−π/2) further comprises: the controlled unitary operator circuit U_(φ), at least one bit-flip operator X, and at least one phase-shift operator R_(ϕ); wherein the controlled estimation unitary operator circuit U_(φ−π/2)=e^(−iπ/2)|0

0|⊗U_(φ)+e^(iπ/2)|1

1|⊗U_(φ) ^(†).
 15. A system of quantum circuits for implementing an oracle U q for a non-boolean function φ, the system configured to: initialize an ancilla qubit in a |+

state and an input qubit in a |ψ₀

state of a plurality of eigenstates |x

to define a two-register state |Ψ₀

≡|+,ψ₀

; for each of a plurality K of iterations receive, using the input qubit, a respective one of the plurality of eigenstates |x

defining an input basis state, for odd iterations of the plurality K of iterations, act on the input basis state using a selective phase-flip unitary operator circuit S_(Ψ) ₀ and a controlled unitary operator circuit U_(φ), and for even iterations of the plurality K of iterations, act on the input basis state using the selective phase-flip unitary operator circuit S_(Ψ) ₀ and a controlled inverse unitary operator circuit U_(φ) ^(†).
 16. The system according to claim 15, further configured to measure, after the plurality K of iterations, the ancilla qubit in a 0/1 basis.
 17. The system according to claim 15, wherein the selective phase-flip unitary operator circuit S_(Ψ) ₀ further comprises: a Hadamard transform H, a unitary operator A₀, a unitary operator I, and an inverse unitary operator A₀ ^(†); wherein the selective phase-flip unitary operator S_(Ψ) ₀ =[H⊗A₀][2|0,0

0,0|−I][H⊗A₀ ^(†)].
 18. The system according to claim 15, further configured, for the ancilla qubit in a state |0

, to act on the input qubit as U_(φ)|0,x

=e^(+iφ(x))|0,x

, U_(φ)|1,x

=e^(−iφ(x))|1,x

.
 19. The system according to claim 15, further configured, for the ancilla qubit in a state |1

, to act on the input qubit as U_(φ) ^(†)|0,x

=e^(+iφ(x))|0,x

, U_(φ) ^(†)|1,x

=e^(−iφ(x))|1,x

.
 20. The system according to claim 15, further configured to: receive, using the input qubit, the |ψ₀

state defining an input random state; and act on the input random state using a controlled estimation unitary operator circuit U_(φ−π/2) comprising: the controlled unitary operator circuit U_(φ), at least one bit-flip operator X, and at least one phase-shift operator R_(ϕ); wherein the controlled estimation unitary operator circuit U_(φ−π/2)=e^(−iπ/2)|0

0|⊗U_(φ)+e^(iπ/2)|1

1|⊗U_(φ) ^(†). 